fixed bug where earlier test was blowing away environment, causing an error on which('modulecmd')

This commit is contained in:
Gregory Becker 2016-05-23 17:39:06 -07:00
parent 1da6bbd146
commit 513aae5ef8

View file

@ -24,17 +24,20 @@
##############################################################################
import unittest
import os
import copy
from spack.environment import EnvironmentModifications
class EnvironmentTest(unittest.TestCase):
def setUp(self):
os.environ.clear()
os.environ['UNSET_ME'] = 'foo'
os.environ['EMPTY_PATH_LIST'] = ''
os.environ['PATH_LIST'] = '/path/second:/path/third'
os.environ['REMOVE_PATH_LIST'] = '/a/b:/duplicate:/a/c:/remove/this:/a/d:/duplicate/:/f/g'
def tearDown(self):
pass
def test_set(self):
env = EnvironmentModifications()
env.set('A', 'dummy value')