Skip to content

Commit

Permalink
test: more windows permission errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ap-- committed Feb 22, 2024
1 parent 5ceac3c commit 48d1aca
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion paquo/tests/test_images.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import platform
import shutil
import sys
import tempfile
from contextlib import nullcontext
from operator import itemgetter
Expand All @@ -23,7 +24,11 @@ def image_entry(svs_small):

@pytest.fixture(scope='function')
def removable_svs_small(svs_small):
with tempfile.TemporaryDirectory(prefix='paquo-') as tmpdir:
kw = {} if sys.version_info < (3, 10) else {"ignore_cleanup_errors": True}
with tempfile.TemporaryDirectory(
prefix='paquo-',
**kw
) as tmpdir:
new_path = Path(tmpdir) / svs_small.name
shutil.copy(svs_small, new_path)
yield new_path
Expand Down

0 comments on commit 48d1aca

Please sign in to comment.