diff options
author | Michał Górny <mgorny@gentoo.org> | 2011-08-05 22:49:01 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2011-08-05 22:49:01 +0200 |
commit | 366de7bc9b40a9957117c09523063ad6bcf610e3 (patch) | |
tree | 7702daa3ea07ef728ccc19dcad6df146bfca7258 /pmstestsuite/library | |
parent | Fix HTML table misalignment. (diff) | |
download | pms-test-suite-366de7bc9b40a9957117c09523063ad6bcf610e3.tar.gz pms-test-suite-366de7bc9b40a9957117c09523063ad6bcf610e3.tar.bz2 pms-test-suite-366de7bc9b40a9957117c09523063ad6bcf610e3.zip |
Clear D-Bus result buffers when checking results.
Diffstat (limited to 'pmstestsuite/library')
-rw-r--r-- | pmstestsuite/library/standard/dbus_case.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/pmstestsuite/library/standard/dbus_case.py b/pmstestsuite/library/standard/dbus_case.py index 97462fb..9fcdb6e 100644 --- a/pmstestsuite/library/standard/dbus_case.py +++ b/pmstestsuite/library/standard/dbus_case.py @@ -55,14 +55,20 @@ class RunningTest(dbus.service.Object): Initialize the D-Bus object for test <test>. """ self.test = test - self.test.dbus_output = [] - self.test.dbus_started = False + self.reset() dbus.service.Object.__init__( self, dbus_handler.bus, '%s/%s' % (dbus_object_prefix, test.p.replace('-', '_')) ) + def reset(self): + """ + Reset test results. + """ + self.test.dbus_output = [] + self.test.dbus_started = False + @dbus.service.method( dbus_interface=dbus_interface_name, in_signature='', out_signature='') @@ -105,6 +111,7 @@ class DBusBaseTestCase(object): def check_result(self, pm): self.assertTrue(self.dbus_started, 'build started') self.check_dbus_result(self.dbus_output, pm) + self._dbusobj.reset() class DBusEbuildTestCase(DBusBaseTestCase, EbuildTestCase): """ D-Bus capable base test case. """ |