mirror of
https://github.com/python/cpython.git
synced 2025-10-18 20:58:48 +00:00
Fix test_os: os.environb doesn't exist on Windows
This commit is contained in:
parent
8124feb07b
commit
208d28cd41
1 changed files with 5 additions and 3 deletions
|
@ -369,6 +369,7 @@ class EnvironTests(mapping_tests.BasicTestMappingProtocol):
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
self.__save = dict(os.environ)
|
self.__save = dict(os.environ)
|
||||||
|
if os.name not in ('os2', 'nt'):
|
||||||
self.__saveb = dict(os.environb)
|
self.__saveb = dict(os.environb)
|
||||||
for key, value in self._reference().items():
|
for key, value in self._reference().items():
|
||||||
os.environ[key] = value
|
os.environ[key] = value
|
||||||
|
@ -376,6 +377,7 @@ class EnvironTests(mapping_tests.BasicTestMappingProtocol):
|
||||||
def tearDown(self):
|
def tearDown(self):
|
||||||
os.environ.clear()
|
os.environ.clear()
|
||||||
os.environ.update(self.__save)
|
os.environ.update(self.__save)
|
||||||
|
if os.name not in ('os2', 'nt'):
|
||||||
os.environb.clear()
|
os.environb.clear()
|
||||||
os.environb.update(self.__saveb)
|
os.environb.update(self.__saveb)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue