diff options
author | Simon Feltman <sfeltman@src.gnome.org> | 2013-09-26 19:05:20 -0700 |
---|---|---|
committer | Simon Feltman <sfeltman@src.gnome.org> | 2013-10-07 16:18:09 -0700 |
commit | 73c6213e8b47fa7c4c2c7a517fe7b56126145888 (patch) | |
tree | 820cd31f702734d165007dde237e55eb5fcc0583 /tests/test_everything.py | |
parent | a76b06179cdca43f1c7d1feb8e2563e3d884a8ff (diff) | |
download | pygobject-73c6213e8b47fa7c4c2c7a517fe7b56126145888.tar.gz |
Don't pass None to callbacks when user data is not specified
For APIs which support a callback and optional user data,
don't pass the user data to the callback if it was not explicitly
specified when the callback was connected.
https://bugzilla.gnome.org/show_bug.cgi?id=640812
Diffstat (limited to 'tests/test_everything.py')
-rw-r--r-- | tests/test_everything.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/tests/test_everything.py b/tests/test_everything.py index 0c6533a8..ab1fc487 100644 --- a/tests/test_everything.py +++ b/tests/test_everything.py @@ -717,12 +717,10 @@ class TestCallbacks(unittest.TestCase): self.assertEqual(TestCallbacks.called, 100) - def test_callback_userdata_none_default_arg(self): + def test_callback_userdata_no_user_data(self): TestCallbacks.called = 0 - userdata_list = [] - def callback(userdata): - userdata_list.append(userdata) + def callback(): TestCallbacks.called += 1 return TestCallbacks.called @@ -731,7 +729,6 @@ class TestCallbacks(unittest.TestCase): self.assertEqual(val, i + 1) self.assertEqual(TestCallbacks.called, 100) - self.assertSequenceEqual(userdata_list, [None] * 100) def test_async_ready_callback(self): TestCallbacks.called = False |