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

Method test_issue_89047

Lib/test/test_logging.py:4852–4858  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

4850 self.assertEqual(f.formatTime(r), '21/04/1993 08:03:00')
4851
4852 def test_issue_89047(self):
4853 f = logging.Formatter(fmt='{asctime}.{msecs:03.0f} {message}', style='{', datefmt="%Y-%m-%d %H:%M:%S")
4854 for i in range(2500):
4855 time.sleep(0.0004)
4856 r = logging.makeLogRecord({'msg': 'Message %d' % (i + 1)})
4857 s = f.format(r)
4858 self.assertNotIn('.1000', s)
4859
4860 def test_msecs_has_no_floating_point_precision_loss(self):
4861 # See issue gh-102402

Callers

nothing calls this directly

Calls 3

formatMethod · 0.95
assertNotInMethod · 0.80
sleepMethod · 0.45

Tested by

no test coverage detected