[pygobject] tests: Re-enable test_callback_scope_call_array() check
- From: Martin Pitt <martinpitt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject] tests: Re-enable test_callback_scope_call_array() check
- Date: Fri, 11 Jan 2013 08:48:02 +0000 (UTC)
commit 9a8c49087cf400e01c1f78241fa4d74b4d15f54e
Author: Martin Pitt <martinpitt gnome org>
Date: Fri Jan 11 09:46:56 2013 +0100
tests: Re-enable test_callback_scope_call_array() check
Drop the expected failure from test_callback_scope_call_array() and just add
the explicit array length arguments. While it would look cleaner to not pass
them, it is probably not worth breaking the API for this.
tests/test_everything.py | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/tests/test_everything.py b/tests/test_everything.py
index 4907a84..dcc61e8 100644
--- a/tests/test_everything.py
+++ b/tests/test_everything.py
@@ -675,17 +675,14 @@ class TestCallbacks(unittest.TestCase):
self.assertEqual(TestCallbacks.called, 2)
self.assertEqual(sys.getrefcount(callback), refcount)
- # FIXME: TypeError: callback() takes 2 positional arguments but 4 were given
- # does not remove the array length arguments
- @unittest.expectedFailure
def test_callback_scope_call_array(self):
# This tests a callback that gets called multiple times from a
# single scope call in python with array arguments
TestCallbacks.callargs = []
- # works with:
- #def callback(one, one_length, two, two_length):
- def callback(one, two):
+ # FIXME: would be cleaner without the explicit length args:
+ # def callback(one, two):
+ def callback(one, one_length, two, two_length):
TestCallbacks.callargs.append((one, two))
return len(TestCallbacks.callargs)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]