From 4a7dd67caa616724f4a1d52ee9961c46782d70c9 Mon Sep 17 00:00:00 2001 From: mapix Date: Sat, 22 Jun 2024 21:34:07 +0800 Subject: [PATCH] skip the uploadtwice02 test on non-Windows systems for os.unlink only raises a locking error on Windows --- tests/test_uploading_same_file_twice_with_errors.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test_uploading_same_file_twice_with_errors.py b/tests/test_uploading_same_file_twice_with_errors.py index 1c3d132..1e3353c 100644 --- a/tests/test_uploading_same_file_twice_with_errors.py +++ b/tests/test_uploading_same_file_twice_with_errors.py @@ -1,3 +1,4 @@ +import sys from pathlib import Path import shutil import threading @@ -139,6 +140,7 @@ def upload_file(file_to_upload): # Run with pytest -k uploadtwice02 +@pytest.mark.skipif(sys.platform in ["linux", "darwin"], reason="os.unlik() is not blocking on Linux and MacOS") def test_uploadtwice02_upload_a_file_twice_with_error( dash_duo, testfile10kb_csv, testfile10kb_2_csv ):