Skip to content

Commit dfef37b

Browse files
committed
Correct error on test teardown.
1 parent 076758e commit dfef37b

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

Tests/test_image_access.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,4 +317,8 @@ def test_embeddable(self) -> None:
317317
assert process.returncode == 0
318318

319319
def teardown_method(self) -> None:
320-
os.remove("embed_pil.c")
320+
try:
321+
os.remove("embed_pil.c")
322+
except FileNotFoundError:
323+
# If the test was skipped or failed, the file won't exist,
324+
pass

0 commit comments

Comments
 (0)