Skip to content

Commit ea83c4a

Browse files
committed
tests: cache sample files
1 parent 96b89c3 commit ea83c4a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/conftest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def download_images(url, download_path):
2323
return output
2424
def extract_images(path, destination):
2525
print("Extracting images")
26-
with tarfile.open(os.path.join(path, "sample_images.tar.gz"), "r:gz") as archive_file:
26+
with tarfile.open(path, "r:gz") as archive_file:
2727
for item in archive_file.getmembers():
2828
print("Extracting {}".format(item.name))
2929
archive_file.extract(item, path=destination)
@@ -52,7 +52,7 @@ def sample_images_readonly(tmpdir_factory):
5252
download_path=download_path
5353
)
5454
verify_hash(archive, sha256_hash=SAMPLE_IMAGES_SHA256)
55-
extract_images(path=download_path, destination=test_path)
55+
extract_images(path=archive, destination=test_path)
5656
yield sample_images_path
5757
if os.path.exists(test_path):
5858
shutil.rmtree(test_path)

0 commit comments

Comments
 (0)