mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Try to improve test coverage for utime()
This commit is contained in:
parent
fe92eef85b
commit
c28e7ad3d0
1 changed files with 4 additions and 0 deletions
|
@ -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():
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue