diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2007-04-04 18:30:56 +0000 |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2007-04-04 18:30:56 +0000 |
commit | 8863544522d78e89907bfbe18754426fdce6edea (patch) | |
tree | f22e3798fbc7789d06d18cdfbe373d885f2ad5ff /Lib/test/test_os.py | |
parent | 5d2d2ef1f5b23abf8d67437fb7288644053657eb (diff) | |
download | cpython-git-8863544522d78e89907bfbe18754426fdce6edea.tar.gz |
Bug #1686475: Support stat'ing open files on Windows again.
Diffstat (limited to 'Lib/test/test_os.py')
-rw-r--r-- | Lib/test/test_os.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py index 984484c4c3..69e456c1b3 100644 --- a/Lib/test/test_os.py +++ b/Lib/test/test_os.py @@ -231,6 +231,15 @@ class StatAttributeTests(unittest.TestCase): os.utime(self.fname, (t1, t1)) self.assertEquals(os.stat(self.fname).st_mtime, t1) + def test_1686475(self): + # Verify that an open file can be stat'ed + try: + os.stat(r"c:\pagefile.sys") + except WindowsError, e: + if e == 2: # file does not exist; cannot run test + return + self.fail("Could not stat pagefile.sys") + from test import mapping_tests class EnvironTests(mapping_tests.BasicTestMappingProtocol): |