summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAndoni Morales Alastruey <ylatuya@gmail.com>2012-10-23 17:45:50 +0200
committerAndoni Morales Alastruey <ylatuya@gmail.com>2012-10-23 17:52:29 +0200
commit0474b8a516521a94af1eb9697012956f5e7d11a1 (patch)
treeccd0bf623c972c45291f901098ddf80665f202ba /test
parent1a6078f119b1802a608ab6d78f97bef31f15f3ae (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.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/test_cerbero_build_build.py b/test/test_cerbero_build_build.py
index b7102080..1fad1bc5 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}