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

Method test_poll

Lib/test/test_subprocess.py:1406–1415  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1404 'ab ""')
1405
1406 def test_poll(self):
1407 p = subprocess.Popen([sys.executable, "-c",
1408 "import os; os.read(0, 1)"],
1409 stdin=subprocess.PIPE)
1410 self.addCleanup(p.stdin.close)
1411 self.assertIsNone(p.poll())
1412 os.write(p.stdin.fileno(), b'A')
1413 p.wait()
1414 # Subsequent invocations should just return the returncode
1415 self.assertEqual(p.poll(), 0)
1416
1417 def test_wait(self):
1418 p = subprocess.Popen(ZERO_RETURN_CMD)

Callers

nothing calls this directly

Calls 7

pollMethod · 0.95
waitMethod · 0.95
addCleanupMethod · 0.80
assertIsNoneMethod · 0.80
writeMethod · 0.45
filenoMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected