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

Method test_readrc_homedir

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

Source from the content-addressed store, hash-verified

4084 self.assertIn("NameError: name 'invalid' is not defined", stdout)
4085
4086 def test_readrc_homedir(self):
4087 with os_helper.EnvironmentVarGuard() as env:
4088 env.unset("HOME")
4089 with os_helper.temp_dir() as temp_dir, patch("os.path.expanduser"):
4090 rc_path = os.path.join(temp_dir, ".pdbrc")
4091 os.path.expanduser.return_value = rc_path
4092 with open(rc_path, "w") as f:
4093 f.write("invalid")
4094 self.assertEqual(pdb.Pdb().rcLines[0], "invalid")
4095
4096 def test_readrc_current_dir(self):
4097 with os_helper.temp_cwd() as cwd:

Callers

nothing calls this directly

Calls 7

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

Tested by

no test coverage detected