(self)
| 791 | proc.kill() |
| 792 | |
| 793 | def test_env(self): |
| 794 | newenv = os.environ.copy() |
| 795 | newenv["FRUIT"] = "orange" |
| 796 | with subprocess.Popen([sys.executable, "-c", |
| 797 | 'import sys,os;' |
| 798 | 'sys.stdout.write(os.getenv("FRUIT"))'], |
| 799 | stdout=subprocess.PIPE, |
| 800 | env=newenv) as p: |
| 801 | stdout, stderr = p.communicate() |
| 802 | self.assertEqual(stdout, b"orange") |
| 803 | |
| 804 | @unittest.skipUnless(sys.platform == "win32", "Windows only issue") |
| 805 | def test_win32_duplicate_envs(self): |
nothing calls this directly
no test coverage detected