| 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: |