Revert os.py 1.75, and directly implement update.

Fixes #1110478 and #1100235.
This commit is contained in:
Martin v. Löwis 2005-01-29 13:29:23 +00:00
parent 3069dbb8ec
commit 1d11de6dbd
3 changed files with 31 additions and 0 deletions

View file

@ -226,6 +226,13 @@ class EnvironTests(mapping_tests.BasicTestMappingProtocol):
os.environ.clear()
os.environ.update(self.__save)
# Bug 1110478
def test_update(self):
if os.path.exists("/bin/sh"):
os.environ.update(HELLO="World")
value = os.popen("/bin/sh -c 'echo $HELLO'").read().strip()
self.assertEquals(value, "World")
class WalkTests(unittest.TestCase):
"""Tests for os.walk()."""