diff options
Diffstat (limited to 'Lib/test/test_os.py')
-rw-r--r-- | Lib/test/test_os.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py index 15ed557..6cabb82 100644 --- a/Lib/test/test_os.py +++ b/Lib/test/test_os.py @@ -20,6 +20,11 @@ class FileTests(unittest.TestCase): os.close(f) self.assert_(os.access(test_support.TESTFN, os.W_OK)) + def test_closerange(self): + f = os.open(test_support.TESTFN, os.O_CREAT|os.O_RDWR) + # close a fd that is open, and one that isn't + os.closerange(f, f+2) + self.assertRaises(OSError, os.write, f, "a") # Test attributes on return values from os.*stat* family. class StatAttributeTests(unittest.TestCase): |