diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2012-03-04 02:37:42 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2012-03-04 18:02:06 +0100 |
commit | 646f6b2697147ebabe5ee985b13964d5e3f33ae1 (patch) | |
tree | 171739545da0f9994385f43432c00e8c84e4fd04 /selftest/tests | |
parent | 7060d68015b102fe3109683b387bd2218d9473d8 (diff) | |
download | samba-646f6b2697147ebabe5ee985b13964d5e3f33ae1.tar.gz samba-646f6b2697147ebabe5ee985b13964d5e3f33ae1.tar.bz2 samba-646f6b2697147ebabe5ee985b13964d5e3f33ae1.zip |
selftest: Add tests for trying to reuse an environment that has gone down.
Diffstat (limited to 'selftest/tests')
-rw-r--r-- | selftest/tests/test_target.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/selftest/tests/test_target.py b/selftest/tests/test_target.py index 6236dcbec9..0a5d1c4310 100644 --- a/selftest/tests/test_target.py +++ b/selftest/tests/test_target.py @@ -20,9 +20,10 @@ """Tests for selftest.target.""" from selftest.target import ( + Environment, + EnvironmentDown, EnvironmentManager, NoneEnvironment, - Environment, Target, ) @@ -86,6 +87,11 @@ class EnvironmentManagerTests(unittest.TestCase): env2 = self.mgr.setup_env("something", "prefix") self.assertIs(env1, env2) + def test_setup_down(self): + env1 = self.mgr.setup_env("something", "prefix") + env1.check_ret = False + self.assertRaises(EnvironmentDown, self.mgr.setup_env, "something", "") + def test_check(self): env = self.mgr.setup_env("something", "prefix") self.assertTrue(env.check()) |