diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2010-05-07 00:54:14 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2010-05-07 00:54:14 (GMT) |
commit | 208d28cd41ad5cb4bd8665923d486d96232d9a42 (patch) | |
tree | b35ee07e40d051cb33675dacffb9e39645d15540 | |
parent | 8124feb07b130bb39d13f2f3cb6457b185694e41 (diff) | |
download | cpython-208d28cd41ad5cb4bd8665923d486d96232d9a42.zip cpython-208d28cd41ad5cb4bd8665923d486d96232d9a42.tar.gz cpython-208d28cd41ad5cb4bd8665923d486d96232d9a42.tar.bz2 |
Fix test_os: os.environb doesn't exist on Windows
-rw-r--r-- | Lib/test/test_os.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py index 727b00e..443d2b9 100644 --- a/Lib/test/test_os.py +++ b/Lib/test/test_os.py @@ -369,15 +369,17 @@ class EnvironTests(mapping_tests.BasicTestMappingProtocol): def setUp(self): self.__save = dict(os.environ) - self.__saveb = dict(os.environb) + if os.name not in ('os2', 'nt'): + self.__saveb = dict(os.environb) for key, value in self._reference().items(): os.environ[key] = value def tearDown(self): os.environ.clear() os.environ.update(self.__save) - os.environb.clear() - os.environb.update(self.__saveb) + if os.name not in ('os2', 'nt'): + os.environb.clear() + os.environb.update(self.__saveb) def _reference(self): return {"KEY1":"VALUE1", "KEY2":"VALUE2", "KEY3":"VALUE3"} |