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

Method _test_underlying_process_env

Lib/test/test_os/test_os.py:1527–1536  ·  view source on GitHub ↗
(self, var, expected)

Source from the content-addressed store, hash-verified

1525 self._test_environ_iteration(os.environ.values())
1526
1527 def _test_underlying_process_env(self, var, expected):
1528 if not (unix_shell and os.path.exists(unix_shell)):
1529 return
1530 elif not support.has_subprocess_support:
1531 return
1532
1533 with os.popen(f"{unix_shell} -c 'echo ${var}'") as popen:
1534 value = popen.read().strip()
1535
1536 self.assertEqual(expected, value)
1537
1538 def test_or_operator(self):
1539 overridden_key = '_TEST_VAR_'

Callers 4

test_or_operatorMethod · 0.95
test_ior_operatorMethod · 0.95
test_ror_operatorMethod · 0.95

Calls 4

existsMethod · 0.45
stripMethod · 0.45
readMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected