Added --preview-if-missing, #446

This commit is contained in:
Rhet Turnbull
2021-07-04 10:03:36 -07:00
parent 675371f0d7
commit 632169f277
11 changed files with 169 additions and 133 deletions

View File

@@ -863,17 +863,12 @@ def test_export_7(photosdb):
def test_export_8(photosdb):
# try to export missing file
# should raise exception
tempdir = tempfile.TemporaryDirectory(prefix="osxphotos_")
dest = tempdir.name
photos = photosdb.photos(uuid=[UUID_DICT["missing"]])
filename = photos[0].filename
with pytest.raises(Exception) as e:
assert photos[0].export(dest)[0]
assert e.type == type(FileNotFoundError())
assert photos[0].export(dest) == []
def test_export_9(photosdb):