Test interaction mode setup and execution.
(self)
| 920 | self.assertEqual(outputs[0], {"help": "break"}) |
| 921 | |
| 922 | def test_interact_mode(self): |
| 923 | """Test interaction mode setup and execution.""" |
| 924 | # First set up interact mode |
| 925 | self.pdb.do_interact("") |
| 926 | |
| 927 | # Verify _interact_state is properly initialized |
| 928 | self.assertIsNotNone(self.pdb._interact_state) |
| 929 | self.assertIsInstance(self.pdb._interact_state, dict) |
| 930 | |
| 931 | # Test running code in interact mode |
| 932 | with unittest.mock.patch.object(self.pdb, '_error_exc') as mock_error: |
| 933 | self.pdb._run_in_python_repl("print('test')") |
| 934 | mock_error.assert_not_called() |
| 935 | |
| 936 | # Test with syntax error |
| 937 | self.pdb._run_in_python_repl("if:") |
| 938 | mock_error.assert_called_once() |
| 939 | |
| 940 | def test_registering_commands(self): |
| 941 | """Test registering breakpoint commands.""" |
nothing calls this directly
no test coverage detected