MCPcopy Create free account
hub / github.com/dateutil/dateutil / testMicrosecondPrecisionErrorReturns

Method testMicrosecondPrecisionErrorReturns

tests/test_parser.py:608–616  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

606 assert dt2.microsecond == 10000
607
608 def testMicrosecondPrecisionErrorReturns(self):
609 # One more precision issue, discovered by Eric Brown. This should
610 # be the last one, as we're no longer using floating points.
611 for ms in [100001, 100000, 99999, 99998,
612 10001, 10000, 9999, 9998,
613 1001, 1000, 999, 998,
614 101, 100, 99, 98]:
615 dt = datetime(2008, 2, 27, 21, 26, 1, ms)
616 assert parse(dt.isoformat()) == dt
617
618 def testCustomParserInfo(self):
619 # Custom parser info wasn't working, as Michael Elsdörfer discovered.

Callers

nothing calls this directly

Calls 1

parseFunction · 0.90

Tested by

no test coverage detected