diff options
author | Michał Górny <mgorny@gentoo.org> | 2011-08-11 23:46:24 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2011-08-11 23:46:24 +0200 |
commit | b52bac87315602abb8f550f5d22448ecf459724f (patch) | |
tree | 464f6c25c471d39a653167f3797663ef344849a4 /pmstestsuite/library | |
parent | Prefix dep assertions and add them to assert list. (diff) | |
download | pms-test-suite-b52bac87315602abb8f550f5d22448ecf459724f.tar.gz pms-test-suite-b52bac87315602abb8f550f5d22448ecf459724f.tar.bz2 pms-test-suite-b52bac87315602abb8f550f5d22448ecf459724f.zip |
Get dependency asserts before package ones.
That ordering seems more logical.
Diffstat (limited to 'pmstestsuite/library')
-rw-r--r-- | pmstestsuite/library/depend_case.py | 22 | ||||
-rw-r--r-- | pmstestsuite/library/standard/dbus_case.py | 8 |
2 files changed, 24 insertions, 6 deletions
diff --git a/pmstestsuite/library/depend_case.py b/pmstestsuite/library/depend_case.py index 55e49cc..0d4f8e7 100644 --- a/pmstestsuite/library/depend_case.py +++ b/pmstestsuite/library/depend_case.py @@ -118,8 +118,17 @@ class EbuildDependencyTestCase(BaseDependencyTestCase, EbuildTestCase): return of def check_result(self, pm): + try: + BaseDependencyTestCase.check_result(self, pm) + except AssertionError as e: + exc = e + else: + exc = None + EbuildTestCase.check_result(self, pm) - BaseDependencyTestCase.check_result(self, pm) + + if exc is not None: + raise exc class EclassDependencyTestCase(BaseDependencyTestCase, EclassTestCase): """ @@ -180,5 +189,14 @@ class EclassDependencyTestCase(BaseDependencyTestCase, EclassTestCase): return of def check_result(self, pm): + try: + BaseDependencyTestCase.check_result(self, pm) + except AssertionError as e: + exc = e + else: + exc = None + EclassTestCase.check_result(self, pm) - BaseDependencyTestCase.check_result(self, pm) + + if exc is not None: + raise exc diff --git a/pmstestsuite/library/standard/dbus_case.py b/pmstestsuite/library/standard/dbus_case.py index 7d1b46f..a76bba4 100644 --- a/pmstestsuite/library/standard/dbus_case.py +++ b/pmstestsuite/library/standard/dbus_case.py @@ -151,9 +151,9 @@ class DBusEbuildDependencyTestCase(DBusBaseTestCase, EbuildDependencyTestCase): EbuildDependencyTestCase.check_result(self, pm) def check_result(self, pm): - self.assertBool(not self.expect_failure, self.dbus_started, - 'build started') + started = self.dbus_started self.check_dbus_result(self._pop_dbus_output(), pm) + self.assertBool(not self.expect_failure, started, 'build started') class DBusEclassDependencyTestCase(DBusBaseTestCase, EclassDependencyTestCase): """ D-Bus capable eclass dependency test case. """ @@ -167,6 +167,6 @@ class DBusEclassDependencyTestCase(DBusBaseTestCase, EclassDependencyTestCase): EclassDependencyTestCase.check_result(self, pm) def check_result(self, pm): - self.assertBool(not self.expect_failure, self.dbus_started, - 'build started') + started = self.dbus_started self.check_dbus_result(self._pop_dbus_output(), pm) + self.assertBool(not self.expect_failure, started, 'build started') |