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

Method test_stderr_none

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

Source from the content-addressed store, hash-verified

348 self.assertEqual(out.rstrip(), b'test_stdout_none')
349
350 def test_stderr_none(self):
351 # .stderr is None when not redirected
352 p = subprocess.Popen([sys.executable, "-c", 'print("banana")'],
353 stdin=subprocess.PIPE, stdout=subprocess.PIPE)
354 self.addCleanup(p.stdout.close)
355 self.addCleanup(p.stdin.close)
356 p.wait()
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

Callers

nothing calls this directly

Calls 3

waitMethod · 0.95
addCleanupMethod · 0.80
assertEqualMethod · 0.45

Tested by

no test coverage detected