diff options
-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()) |