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

Method test_run_show

Lib/idlelib/idle_test/test_warning.py:41–46  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

39 self.assertIs(warnings.showwarning, showwarning)
40
41 def test_run_show(self):
42 with captured_stderr() as f:
43 run.idle_showwarning_subproc(
44 'Test', UserWarning, 'test_warning.py', 99, f, 'Line of code')
45 # The following uses .splitlines to erase line-ending differences
46 self.assertEqual(idlemsg.splitlines(), f.getvalue().splitlines())
47
48
49class ShellWarnTest(unittest.TestCase):

Callers

nothing calls this directly

Calls 4

captured_stderrFunction · 0.90
assertEqualMethod · 0.45
splitlinesMethod · 0.45
getvalueMethod · 0.45

Tested by

no test coverage detected