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

Method wait_for_server

Lib/test/test_httpservers.py:1524–1530  ·  view source on GitHub ↗

Check that the server has been successfully started.

(self, proc, protocol, bind, port)

Source from the content-addressed store, hash-verified

1522 return match.group(1).lower(), match.group(2), int(match.group(3))
1523
1524 def wait_for_server(self, proc, protocol, bind, port):
1525 """Check that the server has been successfully started."""
1526 line = proc.stdout.readline().strip()
1527 if support.verbose:
1528 print()
1529 print('python -m http.server: ', line)
1530 return self.parse_cli_output(line) == (protocol, bind, port)
1531
1532 def test_http_client(self):
1533 bind, port = '127.0.0.1', find_unused_port()

Callers 2

test_http_clientMethod · 0.95
test_https_clientMethod · 0.95

Calls 3

parse_cli_outputMethod · 0.95
stripMethod · 0.45
readlineMethod · 0.45

Tested by

no test coverage detected