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

Method test_should_rollover

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

Source from the content-addressed store, hash-verified

6425 self.assertEqual(data.decode(), m.msg + os.linesep)
6426
6427 def test_should_rollover(self):
6428 with open(self.fn, 'wb') as f:
6429 f.write(b'\n')
6430 rh = logging.handlers.RotatingFileHandler(self.fn, encoding="utf-8", maxBytes=2)
6431 self.assertTrue(rh.shouldRollover(self.next_rec()))
6432 rh.close()
6433
6434 def test_file_created(self):
6435 # checks that the file is created and assumes it was created

Callers

nothing calls this directly

Calls 6

shouldRolloverMethod · 0.95
assertTrueMethod · 0.80
next_recMethod · 0.80
openFunction · 0.50
writeMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected