Skip to content

Commit a559bd3

Browse files
committed
Adapt test for different error on win32
1 parent 25a2690 commit a559bd3

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Lib/test/test_shutil.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1125,7 +1125,10 @@ def _assert_are_the_same_file_is_raised(src_dir, target_dir):
11251125
raise Exception("copytree did not raise")
11261126
except Error as error:
11271127
assert len(error.args[0]) == 1
1128-
assert "are the same file" in error.args[0][0][2]
1128+
if sys.platform == "win32":
1129+
assert "it is being used by another process" in error.args[0][0][2]
1130+
else:
1131+
assert "are the same file" in error.args[0][0][2]
11291132

11301133
class TestCopy(BaseTest, unittest.TestCase):
11311134

0 commit comments

Comments
 (0)