MCPcopy Index your code
hub / github.com/RustPython/RustPython / test

Method test

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

Source from the content-addressed store, hash-verified

6697 # DST begins at 2012-3-11T02:00:00 and ends at 2012-11-4T02:00:00.
6698 DT = datetime.datetime
6699 def test(current, expected):
6700 actual = fh.computeRollover(current.timestamp())
6701 diff = actual - expected.timestamp()
6702 if diff:
6703 self.assertEqual(diff, 0, datetime.timedelta(seconds=diff))
6704
6705 fh = logging.handlers.TimedRotatingFileHandler(
6706 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