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

Method _assert_python

Lib/test/test_subprocess.py:359–365  ·  view source on GitHub ↗
(self, pre_args, **kwargs)

Source from the content-addressed store, hash-verified

357 self.assertEqual(p.stderr, None)
358
359 def _assert_python(self, pre_args, **kwargs):
360 # We include sys.exit() to prevent the test runner from hanging
361 # whenever python is found.
362 args = pre_args + ["import sys; sys.exit(47)"]
363 p = subprocess.Popen(args, **kwargs)
364 p.wait()
365 self.assertEqual(47, p.returncode)
366
367 def test_executable(self):
368 # Check that the executable argument works.

Calls 2

waitMethod · 0.95
assertEqualMethod · 0.45

Tested by

no test coverage detected