diff options
author | 2012-01-03 18:07:03 +0100 | |
---|---|---|
committer | 2012-01-03 18:07:03 +0100 | |
commit | 980fe4c9237ff98ba4cb165854831d56b2ffc39c (patch) | |
tree | 3be7d9b4d52b48c59244b9aeef10bc38cb010c46 | |
parent | Reraise test case exceptions neatly. (diff) | |
download | pms-test-suite-980fe4c9237ff98ba4cb165854831d56b2ffc39c.tar.gz pms-test-suite-980fe4c9237ff98ba4cb165854831d56b2ffc39c.tar.bz2 pms-test-suite-980fe4c9237ff98ba4cb165854831d56b2ffc39c.zip |
Fix test code.
-rw-r--r-- | pmstestsuite/library/standard/banned_commands.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/pmstestsuite/library/standard/banned_commands.py b/pmstestsuite/library/standard/banned_commands.py index 7e3de17..5ddc80f 100644 --- a/pmstestsuite/library/standard/banned_commands.py +++ b/pmstestsuite/library/standard/banned_commands.py @@ -36,12 +36,12 @@ class DoHardCommandTest(BannedCommandTest): except IndexError: res = None + exc = None if self.eapi < 4: try: self.assertTrue(res, 'hardlink created') except AssertionError as e: - if exc is None: - exc = e + exc = e try: self.assertTrue(output[1] == '0', 'hardlink preserved after merge', undefined = True) @@ -76,9 +76,6 @@ class DoSedCommandTest(BannedCommandTest): if self.eapi < 4: self.assertEqual(res, 'SED WORKED', 'dosed result') - elif res is not None or exc: + elif res is not None: self.assertNotEqual(res, 'SED WORKED', 'dosed result', undefined = True) - - if exc: - raise exc |