summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <smcv@collabora.com>2018-01-29 10:30:43 +0000
committerSimon McVittie <smcv@collabora.com>2018-01-29 10:30:43 +0000
commit2d5ccd0cb9e580732d0abfbf8a97b1bf779d2a9e (patch)
treedd97ae7b215133dc0619ace7bdd2f446bd703eab
parent05ef07b9b5a6ae4b53dc80728563d2455fe7e24f (diff)
Avoid using async keyword
Signed-off-by: Simon McVittie <smcv@collabora.com>
-rwxr-xr-xtest/test-client.py6
-rwxr-xr-xtest/test-service.py4
2 files changed, 5 insertions, 5 deletions
diff --git a/test/test-client.py b/test/test-client.py
index 913a851..5a177b7 100755
--- a/test/test-client.py
+++ b/test/test-client.py
@@ -334,12 +334,12 @@ class TestDBusBindings(unittest.TestCase):
def testAsyncMethods(self):
print("\n********* Testing asynchronous method implementation *******")
- for async in (True, False):
+ for async_ in (True, False):
for fail in (True, False):
try:
val = ('a', 1, False, [1,2], {1:2})
- print("calling AsynchronousMethod with %s %s %s" % (async, fail, val))
- ret = self.iface.AsynchronousMethod(async, fail, val)
+ print("calling AsynchronousMethod with %s %s %s" % (async_, fail, val))
+ ret = self.iface.AsynchronousMethod(async_, fail, val)
except Exception as e:
self.assertTrue(fail, '%s: %s' % (e.__class__, e))
print("Expected failure: %s: %s" % (e.__class__, e))
diff --git a/test/test-service.py b/test/test-service.py
index 82699d8..4e531cb 100755
--- a/test/test-service.py
+++ b/test/test-service.py
@@ -275,9 +275,9 @@ class TestObject(dbus.service.Object, TestInterface):
@dbus.service.method(IFACE, in_signature='bbv', out_signature='v',
async_callbacks=('return_cb', 'error_cb'))
- def AsynchronousMethod(self, async, fail, variant, return_cb, error_cb):
+ def AsynchronousMethod(self, async_, fail, variant, return_cb, error_cb):
try:
- if async:
+ if async_:
GObject.timeout_add(500, self.AsynchronousMethod, False, fail,
variant, return_cb, error_cb)
return