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

Method test_strings

Lib/test/_test_multiprocessing.py:4085–4098  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

4083
4084 @warnings_helper.ignore_fork_in_thread_deprecation_warnings()
4085 def test_strings(self):
4086 strings = (b'hello', b'', b'a', b'b', b'', b'bye', b'', b'lop')
4087 a, b = self.Pipe()
4088 p = self.Process(target=self._child_strings, args=(b, strings))
4089 p.start()
4090
4091 for s in strings:
4092 for i in range(200):
4093 if a.poll(0.01):
4094 break
4095 x = a.recv_bytes()
4096 self.assertEqual(s, x)
4097
4098 p.join()
4099
4100 @classmethod
4101 def _child_boundaries(cls, r):

Callers

nothing calls this directly

Calls 7

PipeMethod · 0.80
ProcessMethod · 0.45
startMethod · 0.45
pollMethod · 0.45
recv_bytesMethod · 0.45
assertEqualMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected