aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2012-01-03 18:07:03 +0100
committerMichał Górny <mgorny@gentoo.org>2012-01-03 18:07:03 +0100
commit980fe4c9237ff98ba4cb165854831d56b2ffc39c (patch)
tree3be7d9b4d52b48c59244b9aeef10bc38cb010c46
parentReraise test case exceptions neatly. (diff)
downloadpms-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.py9
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