summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2012-03-04 02:32:26 +0100
committerJelmer Vernooij <jelmer@samba.org>2012-03-04 18:02:06 +0100
commitaa7fa63bfaf0757ac4ff4112825333fb4524ce95 (patch)
tree197e14d2a141529352d746a6915d05611e516ed5
parent75eb57cff5f041c3eea067a35647520481cd1516 (diff)
downloadsamba-aa7fa63bfaf0757ac4ff4112825333fb4524ce95.tar.gz
samba-aa7fa63bfaf0757ac4ff4112825333fb4524ce95.tar.bz2
samba-aa7fa63bfaf0757ac4ff4112825333fb4524ce95.zip
selftest.target: Test that environments are reused.
-rw-r--r--selftest/tests/test_target.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/selftest/tests/test_target.py b/selftest/tests/test_target.py
index d29bd66cda..573b65db0a 100644
--- a/selftest/tests/test_target.py
+++ b/selftest/tests/test_target.py
@@ -64,6 +64,11 @@ class EnvironmentManagerTests(unittest.TestCase):
self.assertEquals(env.name, "something")
self.assertEquals(env.prefix, "prefix")
+ def test_setup_reuses(self):
+ env1 = self.mgr.setup_env("something", "prefix")
+ env2 = self.mgr.setup_env("something", "prefix")
+ self.assertIs(env1, env2)
+
def test_check(self):
env = self.mgr.setup_env("something", "prefix")
self.assertTrue(env.check())