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

Method test_message_none

Lib/test/test_traceback.py:2478–2487  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2476 [' File "myfile.py", line 100', 'SyntaxError: bad syntax'])
2477
2478 def test_message_none(self):
2479 # A message that looks like "None" should not be treated specially
2480 err = self.get_report(Exception(None))
2481 self.assertIn('Exception: None\n', err)
2482 err = self.get_report(Exception('None'))
2483 self.assertIn('Exception: None\n', err)
2484 err = self.get_report(Exception())
2485 self.assertIn('Exception\n', err)
2486 err = self.get_report(Exception(''))
2487 self.assertIn('Exception\n', err)
2488
2489 def test_syntax_error_various_offsets(self):
2490 for offset in range(-5, 10):

Callers

nothing calls this directly

Calls 2

assertInMethod · 0.80
get_reportMethod · 0.45

Tested by

no test coverage detected