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

Method test_readrc_cwd_is_home

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

Source from the content-addressed store, hash-verified

4101 self.assertEqual(pdb.Pdb().rcLines[-1], "invalid")
4102
4103 def test_readrc_cwd_is_home(self):
4104 with os_helper.EnvironmentVarGuard() as env:
4105 env.unset("HOME")
4106 with os_helper.temp_cwd() as cwd, patch("os.path.expanduser"):
4107 rc_path = os.path.join(cwd, ".pdbrc")
4108 os.path.expanduser.return_value = rc_path
4109 with open(rc_path, "w") as f:
4110 f.write("invalid")
4111 self.assertEqual(pdb.Pdb().rcLines, ["invalid"])
4112
4113 def test_header(self):
4114 stdout = StringIO()

Callers

nothing calls this directly

Calls 6

patchFunction · 0.90
unsetMethod · 0.80
openFunction · 0.50
joinMethod · 0.45
writeMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected