diff options
Diffstat (limited to 'Lib/test/test_os.py')
-rw-r--r-- | Lib/test/test_os.py | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py index 51663e1..f28f862 100644 --- a/Lib/test/test_os.py +++ b/Lib/test/test_os.py @@ -576,16 +576,18 @@ class Win32ErrorTests(unittest.TestCase): self.assertRaises(WindowsError, os.chdir, support.TESTFN) def test_mkdir(self): - self.assertRaises(WindowsError, os.chdir, support.TESTFN) + f = open(test_support.TESTFN, "w") + try: + self.assertRaises(WindowsError, os.mkdir, support.TESTFN) + finally: + f.close() + os.unlink(test_support.TESTFN) def test_utime(self): self.assertRaises(WindowsError, os.utime, support.TESTFN, None) - def test_access(self): - self.assertRaises(WindowsError, os.utime, support.TESTFN, 0) - def test_chmod(self): - self.assertRaises(WindowsError, os.utime, support.TESTFN, 0) + self.assertRaises(WindowsError, os.chmod, support.TESTFN, 0) class TestInvalidFD(unittest.TestCase): singles = ["fchdir", "dup", "fdopen", "fdatasync", "fstat", |