Skip to content

Commit 11a31ac

Browse files
Skip test on other OSes except Windows
1 parent b658bfc commit 11a31ac

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Lib/test/test_tempfile.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1460,12 +1460,13 @@ def test_explict_cleanup_ignore_errors(self):
14601460
temp_path.exists(),
14611461
f"TemporaryDirectory {temp_path!s} exists after cleanup")
14621462

1463+
@unittest.skipUnless(os.name == "nt", "Only on Windows.")
14631464
def test_explicit_cleanup_correct_error(self):
14641465
with tempfile.TemporaryDirectory() as working_dir:
14651466
temp_dir = self.do_create(dir=working_dir)
14661467
with open(os.path.join(temp_dir.name, "example.txt"), 'wb'):
14671468
# Previously raised NotADirectoryError on some OSes
1468-
# (e.g. WIndows). See bpo-43153.
1469+
# (e.g. Windows). See bpo-43153.
14691470
with self.assertRaises(PermissionError):
14701471
temp_dir.cleanup()
14711472

0 commit comments

Comments
 (0)