diff -r 72a8446fdf9a Lib/test/test_os.py --- a/Lib/test/test_os.py Mon Mar 18 15:04:33 2013 -0700 +++ b/Lib/test/test_os.py Tue Mar 19 12:46:41 2013 -0400 @@ -517,11 +517,11 @@ return os.environ # Bug 1110478 - @unittest.skipUnless(os.path.exists('/bin/sh'), 'requires /bin/sh') def test_update2(self): - os.environ.clear() + self.assertTrue('HELLO' not in os.environ) os.environ.update(HELLO="World") - with os.popen("/bin/sh -c 'echo $HELLO'") as popen: + python_cmd = "{0} -c \"import os;print(os.environ['HELLO'])\"" + with os.popen(python_cmd.format(sys.executable)) as popen: value = popen.read().strip() self.assertEqual(value, "World")