[pygobject] test_gdbus: Drop failure if timeout=0 works differently
- From: Martin Pitt <martinpitt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject] test_gdbus: Drop failure if timeout=0 works differently
- Date: Thu, 29 Nov 2012 08:41:31 +0000 (UTC)
commit 94a6cc93a104b22dcee2ac73cae36b83a4b5d9c1
Author: Martin Pitt <martinpitt gnome org>
Date: Thu Nov 29 09:40:32 2012 +0100
test_gdbus: Drop failure if timeout=0 works differently
In some test environments we do not actually get a timeout exceptions with
timeout=0, but a different error message. So only ensure that we get the right
kind of error.
tests/test_gdbus.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/tests/test_gdbus.py b/tests/test_gdbus.py
index bb5f2d9..805633a 100644
--- a/tests/test_gdbus.py
+++ b/tests/test_gdbus.py
@@ -133,7 +133,9 @@ class TestGDBusClient(unittest.TestCase):
self.dbus_proxy.GetConnectionUnixProcessID('(s)', '1', timeout=0)
self.fail('call with timeout=0 should raise an exception')
except Exception as e:
- self.assertTrue('Timeout' in str(e), str(e))
+ # FIXME: this is not very precise, but in some environments we
+ # do not always get an actual timeout
+ self.assertTrue(isinstance(e, GLib.GError), str(e))
def test_python_calls_sync_noargs(self):
# methods without arguments don't need an explicit signature
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]