Skip to content

Commit 22faf97

Browse files
Only test on posix
1 parent 626af70 commit 22faf97

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Lib/test/test_pathlib/test_pathlib.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -789,14 +789,13 @@ def test_unlink_missing_ok(self):
789789
self.assertFileNotFound(p.unlink)
790790
p.unlink(missing_ok=True)
791791

792+
#Windows will raise FileNotFoundError - handling already tested above.
793+
@needs_posix
792794
def test_unlink_missing_ok_intermediate_file(self):
793795
p = self.cls(self.base) / 'fileAAA'
794796
p.touch()
795797
p = p / 'fileBBB'
796-
if sys.platform.startswith("win"):
797-
self.assertFileNotFound(p.unlink)
798-
else:
799-
self.assertNotADirectory(p.unlink)
798+
self.assertNotADirectory(p.unlink)
800799
p.unlink(missing_ok=True)
801800

802801
def test_rmdir(self):

0 commit comments

Comments
 (0)