[pygobject] Fix test_everything.TestSignals.test_object_param_signal test case



commit 96a9f92da801989464fbcedf6d849819f6dbea64
Author: Martin Pitt <martin pitt ubuntu com>
Date:   Mon Mar 19 15:32:22 2012 +0100

    Fix test_everything.TestSignals.test_object_param_signal test case
    
    The callback gets two arguments, not one. This short-circuited the actual
    assertions. Fix the arguments and update the refcount check, as it is not
    exactly two at the moment.

 tests/test_everything.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/tests/test_everything.py b/tests/test_everything.py
index 05fce88..86ddb42 100644
--- a/tests/test_everything.py
+++ b/tests/test_everything.py
@@ -593,9 +593,9 @@ class TestSignals(unittest.TestCase):
     def test_object_param_signal(self):
         obj = Everything.TestObj();
 
-        def callback (obj_param):
+        def callback(obj, obj_param):
             self.assertEquals(obj_param.props.int, 3)
-            self.assertEquals(obj_param.__grefcount__, 2)
+            self.assertGreater(obj_param.__grefcount__, 1)
 
         obj.connect('sig-with-obj', callback)
         obj.emit_sig_with_obj()



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]