[pygobject/pygobject-3-4] test_gdbus: Drop failure if timeout=0 works differently
- From: Martin Pitt <martinpitt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject/pygobject-3-4] test_gdbus: Drop failure if timeout=0 works differently
- Date: Fri, 30 Nov 2012 07:57:58 +0000 (UTC)
commit 2758e89851cadcde04e1a5fa51ec35923a9d61fa
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 b129419..98f8e0a 100644
--- a/tests/test_gdbus.py
+++ b/tests/test_gdbus.py
@@ -134,7 +134,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]