MCPcopy Create free account
hub / github.com/fabioz/PyDev.Debugger / test_fixture_reader_thread3

Function test_fixture_reader_thread3

tests_python/test_fixtures.py:94–111  ·  view source on GitHub ↗
(_dummy_socket)

Source from the content-addressed store, hash-verified

92
93
94def test_fixture_reader_thread3(_dummy_socket):
95 sock = _DummySocket()
96
97 reader_thread = ReaderThread(sock)
98 reader_thread.start()
99
100 msg = "aaaaaaabbbbbbbccccccc"
101 http = "Content-Length: %s\r\n\r\n%s" % (len(msg), msg)
102 http *= 2
103 initial = http
104 for i in range(1, len(http)):
105 while http:
106 sock.put(http[:i])
107 http = http[i:]
108
109 assert reader_thread.get_next_message("check 1: %s" % i) == msg
110 assert reader_thread.get_next_message("check 2: %s" % i) == msg
111 http = initial

Callers

nothing calls this directly

Calls 5

get_next_messageMethod · 0.95
ReaderThreadClass · 0.90
_DummySocketClass · 0.85
putMethod · 0.80
startMethod · 0.45

Tested by

no test coverage detected