MCPcopy Index your code
hub / github.com/python/cpython / test

Method test

Lib/test/test_logging.py:6868–6872  ·  view source on GitHub ↗
(current, expected)

Source from the content-addressed store, hash-verified

6866 # DST begins at 2012-3-11T02:00:00 and ends at 2012-11-4T02:00:00.
6867 DT = datetime.datetime
6868 def test(current, expected):
6869 actual = fh.computeRollover(current.timestamp())
6870 diff = actual - expected.timestamp()
6871 if diff:
6872 self.assertEqual(diff, 0, datetime.timedelta(seconds=diff))
6873
6874 fh = logging.handlers.TimedRotatingFileHandler(
6875 self.fn, encoding="utf-8", when='MIDNIGHT', utc=False)

Callers

nothing calls this directly

Calls 3

computeRolloverMethod · 0.80
timestampMethod · 0.80
assertEqualMethod · 0.45

Tested by

no test coverage detected