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

Method test_win32_duplicate_envs

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

Source from the content-addressed store, hash-verified

803
804 @unittest.skipUnless(sys.platform == "win32", "Windows only issue")
805 def test_win32_duplicate_envs(self):
806 newenv = os.environ.copy()
807 newenv["fRUit"] = "cherry"
808 newenv["fruit"] = "lemon"
809 newenv["FRUIT"] = "orange"
810 newenv["frUit"] = "banana"
811 with subprocess.Popen(["CMD", "/c", "SET", "fruit"],
812 stdout=subprocess.PIPE,
813 env=newenv) as p:
814 stdout, _ = p.communicate()
815 self.assertEqual(stdout.strip(), b"frUit=banana")
816
817 # Windows requires at least the SYSTEMROOT environment variable to start
818 # Python

Callers

nothing calls this directly

Calls 4

copyMethod · 0.45
communicateMethod · 0.45
assertEqualMethod · 0.45
stripMethod · 0.45

Tested by

no test coverage detected