Test message and error methods send correct JSON.
(self)
| 856 | self.pdb.curframe = frame_info |
| 857 | |
| 858 | def test_message_and_error(self): |
| 859 | """Test message and error methods send correct JSON.""" |
| 860 | self.pdb.message("Test message") |
| 861 | self.pdb.error("Test error") |
| 862 | |
| 863 | outputs = self.sockfile.get_output() |
| 864 | self.assertEqual(len(outputs), 2) |
| 865 | self.assertEqual(outputs[0], {"message": "Test message\n", "type": "info"}) |
| 866 | self.assertEqual(outputs[1], {"message": "Test error", "type": "error"}) |
| 867 | |
| 868 | def test_read_command(self): |
| 869 | """Test reading commands from the socket.""" |
nothing calls this directly
no test coverage detected