diff options
author | Andoni Morales Alastruey <ylatuya@gmail.com> | 2012-10-23 17:45:50 +0200 |
---|---|---|
committer | Andoni Morales Alastruey <ylatuya@gmail.com> | 2012-10-23 17:52:29 +0200 |
commit | 0474b8a516521a94af1eb9697012956f5e7d11a1 (patch) | |
tree | ccd0bf623c972c45291f901098ddf80665f202ba /test | |
parent | 1a6078f119b1802a608ab6d78f97bef31f15f3ae (diff) |
build: fix usage of append_env for variables that are not set
Diffstat (limited to 'test')
-rw-r--r-- | test/test_cerbero_build_build.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/test_cerbero_build_build.py b/test/test_cerbero_build_build.py index b710208..1fad1bc 100644 --- a/test/test_cerbero_build_build.py +++ b/test/test_cerbero_build_build.py @@ -57,6 +57,13 @@ class ModifyEnvTest(unittest.TestCase): val = self.mk.get_env_var(self.var) self.assertEquals(val, self.val1 + self.val2) + def testAppendNonExistentEnv(self): + if self.var in os.environ: + del os.environ[self.var] + self.mk.append_env = {self.var: self.val2} + val = self.mk.get_env_var(self.var) + self.assertEquals(val, self.val2) + def testNewEnv(self): os.environ[self.var] = self.val1 self.mk.new_env = {self.var: self.val2} |