Skip to content

Commit 9e056c5

Browse files
tests/test_general.py:test_3081(): avoid problems on Windows.
On Windows renaming to an existing file never works, so have removed those parts of the test. We still check explicitly that the file handles are closed, so the test is still doing what we want.
1 parent 5d6a7db commit 9e056c5

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

tests/test_general.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -863,17 +863,3 @@ def next_fd():
863863
assert fd2 == fd1 + 1
864864
assert fd3 == fd1
865865
assert fd4 == fd1
866-
867-
# Check copying/renaming to file we have opened; this is mainly for Windows
868-
# where renames fail if destination is open.
869-
#
870-
document = fitz.open(path2)
871-
document.close()
872-
shutil.copy2(path1, path2)
873-
print(f'{document=}')
874-
875-
document = fitz.open(path2)
876-
document.close()
877-
shutil.copy2(path1, path3)
878-
os.rename(path3, path2)
879-
print(f'{document=}')

0 commit comments

Comments
 (0)