summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_os.py
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2007-04-04 18:30:36 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2007-04-04 18:30:36 (GMT)
commit3bf573f918183af170ce2624dd61fe2969ee41aa (patch)
tree4483d8774e621486ee77db75989aa847c91351cd /Lib/test/test_os.py
parent80e8c998a27841ba2e36db897f9e0a76d46cfcae (diff)
downloadcpython-3bf573f918183af170ce2624dd61fe2969ee41aa.zip
cpython-3bf573f918183af170ce2624dd61fe2969ee41aa.tar.gz
cpython-3bf573f918183af170ce2624dd61fe2969ee41aa.tar.bz2
Bug #1686475: Support stat'ing open files on Windows again.
Will backport to 2.5.
Diffstat (limited to 'Lib/test/test_os.py')
-rw-r--r--Lib/test/test_os.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py
index 40d7c3e..51fdc8a 100644
--- a/Lib/test/test_os.py
+++ b/Lib/test/test_os.py
@@ -240,6 +240,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):