Changed temp file handling to use tempfile.TemporaryDirectory, closes #59

This commit is contained in:
Rhet Turnbull
2020-01-28 05:20:17 -08:00
parent 1c792a371f
commit f50cdd5403
3 changed files with 20 additions and 44 deletions

View File

@@ -336,7 +336,7 @@ def test_photosdb_repr():
photosdb = osxphotos.PhotosDB(dbfile=PHOTOS_DB)
photosdb2 = eval(repr(photosdb))
ignore_keys = ["_tmp_db", "_tmp_files"]
ignore_keys = ["_tmp_db", "_tmp_files", "_tempdir", "_tempdir_name"]
assert {k: v for k, v in photosdb.__dict__.items() if k not in ignore_keys} == {
k: v for k, v in photosdb2.__dict__.items() if k not in ignore_keys
}