From 87ce51aef2baa9855efbbe75a8bf09e060d33f57 Mon Sep 17 00:00:00 2001 From: Ryan Reed Date: Thu, 30 Jun 2022 23:38:09 -0400 Subject: [PATCH] Minor comments --- tests/test_project.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/test_project.py b/tests/test_project.py index 1a60753..c5b09db 100644 --- a/tests/test_project.py +++ b/tests/test_project.py @@ -161,16 +161,19 @@ def test_transpose_store_restore(): def test_transpose_restore_force(): nonexistent_path = Path(STORE_DIR).joinpath("long/path") + # Overwrite cache file with nonexistent directory cache_path = Path(TARGET_DIR).joinpath(DEFAULT_CACHE_FILENAME) cache = {"version": version, "original_path": str(nonexistent_path)} with open(str(cache_path), "w") as f: json.dump(cache, f) + # Force not enabled, should raise exception t = Transpose(target_path=TARGET_DIR, store_path=STORE_DIR) with pytest.raises(TransposeError): t.restore() assert not nonexistent_path.exists() + # Force enabled, should create directory tree t = Transpose(target_path=TARGET_DIR, store_path=STORE_DIR, force=True) t.restore() assert nonexistent_path.exists()