mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Revert os.py 1.75, and directly implement update.
Fixes #1110478 and #1100235.
This commit is contained in:
parent
3069dbb8ec
commit
1d11de6dbd
3 changed files with 31 additions and 0 deletions
|
@ -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()."""
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue