Skip to content

Commit

Permalink
Fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
RhetTbull committed Apr 20, 2024
1 parent 0666a91 commit e0930db
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 2 additions & 3 deletions osxphotos/photoexporter.py
Expand Up @@ -1234,8 +1234,7 @@ def _export_aae(
options.export_db.set_history(
filename=str(dest), uuid=self.photo.uuid, action=action, diff=None
)
verbose(f"Skipping up to date AAE file {dest}")
return ExportResults(aae_skipped=[])
return ExportResults(aae_skipped=[str(dest)], skipped=[str(dest)])
else:
action = "export"

Expand Down Expand Up @@ -1289,7 +1288,7 @@ def _export_aae(
verbose(
f"Exported adjustments of {self._filename(self.photo.original_filename)} to {self._filepath(dest)}"
)
return ExportResults(aae_written=[dest], error=errors)
return ExportResults(aae_written=[str(dest)], exported=[str(dest)], error=errors)

def write_exiftool_metadata_to_file(
self,
Expand Down
5 changes: 4 additions & 1 deletion tests/test_cli.py
Expand Up @@ -3853,6 +3853,7 @@ def test_export_aae_as_hardlink():
files = glob.glob("*.*")
assert sorted(files) == sorted(CLI_EXPORT_AAE_FILENAMES)


def test_export_aae_update():
"""Test export with --export-aae --update"""

Expand Down Expand Up @@ -3892,7 +3893,9 @@ def test_export_aae_update():
)
assert result.exit_code == 0
assert "Error" not in result.output
assert re.match(r"Skipped up to date file.*\.AAE", result.output)
assert re.findall(
r"Skipped up to date file (.*\.AAE)", result.output, re.MULTILINE
)


def test_export_sidecar():
Expand Down

0 comments on commit e0930db

Please sign in to comment.