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

Method test_pdbrc_basic

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

Source from the content-addressed store, hash-verified

3989 self.assertNotIn("bdb.py", stdout)
3990
3991 def test_pdbrc_basic(self):
3992 script = textwrap.dedent("""
3993 a = 1
3994 b = 2
3995 """)
3996
3997 pdbrc = textwrap.dedent("""
3998 # Comments should be fine
3999 n
4000 p f"{a+8=}"
4001 """)
4002
4003 stdout, stderr = self.run_pdb_script(script, 'q\n', pdbrc=pdbrc, remove_home=True)
4004 self.assertNotIn("SyntaxError", stdout)
4005 self.assertIn("a+8=9", stdout)
4006 self.assertIn("-> b = 2", stdout)
4007
4008 def test_pdbrc_empty_line(self):
4009 """Test that empty lines in .pdbrc are ignored."""

Callers

nothing calls this directly

Calls 4

run_pdb_scriptMethod · 0.95
assertNotInMethod · 0.80
assertInMethod · 0.80
dedentMethod · 0.45

Tested by

no test coverage detected