mirror of https://github.com/python/cpython.git
Issue #14180: TestDateTime.test_microsecond_rounding() handles localtime() and
gmtime() failure on Windows
This commit is contained in:
parent
21f5893571
commit
8050ca9c6f
|
@ -1741,7 +1741,12 @@ def test_microsecond_rounding(self):
|
|||
zero = fts(0)
|
||||
self.assertEqual(zero.second, 0)
|
||||
self.assertEqual(zero.microsecond, 0)
|
||||
try:
|
||||
minus_one = fts(-1e-6)
|
||||
except OSError:
|
||||
# localtime(-1) and gmtime(-1) is not supported on Windows
|
||||
pass
|
||||
else:
|
||||
self.assertEqual(minus_one.second, 59)
|
||||
self.assertEqual(minus_one.microsecond, 999999)
|
||||
|
||||
|
|
Loading…
Reference in New Issue