From dfef37b65eb9d20fdd625ee7879a16afa88cb4db Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Wed, 30 Jul 2025 15:01:59 +0800 Subject: [PATCH] Correct error on test teardown. --- Tests/test_image_access.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Tests/test_image_access.py b/Tests/test_image_access.py index a847264d2..69e89700c 100644 --- a/Tests/test_image_access.py +++ b/Tests/test_image_access.py @@ -317,4 +317,8 @@ int main(int argc, char* argv[]) assert process.returncode == 0 def teardown_method(self) -> None: - os.remove("embed_pil.c") + try: + os.remove("embed_pil.c") + except FileNotFoundError: + # If the test was skipped or failed, the file won't exist, + pass