We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b658bfc commit 11a31acCopy full SHA for 11a31ac
Lib/test/test_tempfile.py
@@ -1460,12 +1460,13 @@ def test_explict_cleanup_ignore_errors(self):
1460
temp_path.exists(),
1461
f"TemporaryDirectory {temp_path!s} exists after cleanup")
1462
1463
+ @unittest.skipUnless(os.name == "nt", "Only on Windows.")
1464
def test_explicit_cleanup_correct_error(self):
1465
with tempfile.TemporaryDirectory() as working_dir:
1466
temp_dir = self.do_create(dir=working_dir)
1467
with open(os.path.join(temp_dir.name, "example.txt"), 'wb'):
1468
# Previously raised NotADirectoryError on some OSes
- # (e.g. WIndows). See bpo-43153.
1469
+ # (e.g. Windows). See bpo-43153.
1470
with self.assertRaises(PermissionError):
1471
temp_dir.cleanup()
1472
0 commit comments