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

Method test_message_and_error

Lib/test/test_remote_pdb.py:858–866  ·  view source on GitHub ↗

Test message and error methods send correct JSON.

(self)

Source from the content-addressed store, hash-verified

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."""

Callers

nothing calls this directly

Calls 4

messageMethod · 0.45
errorMethod · 0.45
get_outputMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected