Skip to content

Commit a4cb846

Browse files
Windows doesn't raise NotADirectoryError
1 parent 4a776cd commit a4cb846

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Lib/test/test_pathlib/test_pathlib.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -793,7 +793,10 @@ def test_unlink_missing_ok_intermediate_file(self):
793793
p = self.cls(self.base) / 'fileAAA'
794794
p.touch()
795795
p = p / 'fileBBB'
796-
self.assertNotADirectory(p.unlink)
796+
if sys.platform.startswith("win"):
797+
self.assertFileNotFound(p.unlink)
798+
else:
799+
self.assertNotADirectory(p.unlink)
797800
p.unlink(missing_ok=True)
798801

799802
def test_rmdir(self):

0 commit comments

Comments
 (0)