We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d721871 + b13c84b commit 08c111eCopy full SHA for 08c111e
tests/unit/test_shell.py
@@ -435,14 +435,15 @@ class TestParsing(unittest.TestCase):
435
436
def setUp(self):
437
super(TestParsing, self).setUp()
438
- self._orig_environ = os.environ.copy()
+ self._environ_vars = {}
439
keys = os.environ.keys()
440
for k in keys:
441
- if k in ('ST_KEY', 'ST_USER', 'ST_AUTH'):
442
- del os.environ[k]
+ if (k in ('ST_KEY', 'ST_USER', 'ST_AUTH')
+ or k.startswith('OS_')):
443
+ self._environ_vars[k] = os.environ.pop(k)
444
445
def tearDown(self):
- os.environ = self._orig_environ
446
+ os.environ.update(self._environ_vars)
447
448
def _make_fake_command(self, result):
449
def fake_command(parser, args, thread_manager):
0 commit comments