]> granicus.if.org Git - python/commitdiff
Fix test_os: os.environb doesn't exist on Windows
authorVictor Stinner <victor.stinner@haypocalc.com>
Fri, 7 May 2010 00:54:14 +0000 (00:54 +0000)
committerVictor Stinner <victor.stinner@haypocalc.com>
Fri, 7 May 2010 00:54:14 +0000 (00:54 +0000)
Lib/test/test_os.py

index 727b00eebf4ae6de6ed81eb3a775ef8bd91ab355..443d2b9ac1e6f83bfccd2ffb54a7241a615f95ae 100644 (file)
@@ -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"}