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

Method test_code_display

Lib/test/test_pdb.py:4951–4965  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

4949 _colorize.can_colorize = self._original_can_colorize
4950
4951 def test_code_display(self):
4952 output = io.StringIO()
4953 p = pdb.Pdb(stdout=output, colorize=True)
4954 p.set_trace(commands=['ll', 'c'])
4955 self.assertIn("\x1b", output.getvalue())
4956
4957 output = io.StringIO()
4958 p = pdb.Pdb(stdout=output, colorize=False)
4959 p.set_trace(commands=['ll', 'c'])
4960 self.assertNotIn("\x1b", output.getvalue())
4961
4962 output = io.StringIO()
4963 p = pdb.Pdb(stdout=output)
4964 p.set_trace(commands=['ll', 'c'])
4965 self.assertNotIn("\x1b", output.getvalue())
4966
4967 def test_stack_entry(self):
4968 output = io.StringIO()

Callers

nothing calls this directly

Calls 4

set_traceMethod · 0.95
getvalueMethod · 0.95
assertInMethod · 0.80
assertNotInMethod · 0.80

Tested by

no test coverage detected