Kaydet (Commit) c28e7ad3 authored tarafından Neal Norwitz's avatar Neal Norwitz

Try to improve test coverage for utime()

üst fe92eef8
...@@ -150,6 +150,10 @@ class PosixTester(unittest.TestCase): ...@@ -150,6 +150,10 @@ class PosixTester(unittest.TestCase):
if hasattr(posix, 'utime'): if hasattr(posix, 'utime'):
now = time.time() now = time.time()
posix.utime(test_support.TESTFN, None) posix.utime(test_support.TESTFN, None)
self.assertRaises(TypeError, posix.utime, test_support.TESTFN, (None, None))
self.assertRaises(TypeError, posix.utime, test_support.TESTFN, (now, None))
self.assertRaises(TypeError, posix.utime, test_support.TESTFN, (None, now))
posix.utime(test_support.TESTFN, (int(now), int(now)))
posix.utime(test_support.TESTFN, (now, now)) posix.utime(test_support.TESTFN, (now, now))
def test_main(): def test_main():
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment