Skip to content

Commit a7d0ac7

Browse files
committed
Sanitize locations of files
1 parent 7edca16 commit a7d0ac7

8 files changed

+3
-3
lines changed

tests/snapshots/test_snapshots.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ def test_screenshot(path: str):
2424
img_a = Image.open(io.BytesIO(img_data))
2525
img_a.save(f"/tmp/screenshot_new_{path}.png")
2626

27-
if os.path.exists(f"tests/screenshots/screenshot_{path}.png"):
28-
img_b = Image.open(f"tests/screenshots/screenshot_{path}.png")
27+
if os.path.exists(f"tests/snapshots/screenshots/screenshot_{path}.png"):
28+
img_b = Image.open(f"tests/snapshots/screenshots/screenshot_{path}.png")
2929

3030
img_diff = Image.new("RGBA", img_a.size)
3131
# note how there is no need to specify dimensions
@@ -38,6 +38,6 @@ def test_screenshot(path: str):
3838
else:
3939
shutil.copy(
4040
f"/tmp/screenshot_new_{path}.png",
41-
f"tests/screenshots/screenshot_{path}.png",
41+
f"tests/snapshots/screenshots/screenshot_{path}.png",
4242
)
4343
raise Exception("no screenshot available, generating new")

0 commit comments

Comments
 (0)