diff options
author | Martin Pitt <martinpitt@gnome.org> | 2012-04-09 15:20:39 +0200 |
---|---|---|
committer | Martin Pitt <martinpitt@gnome.org> | 2012-04-09 15:20:39 +0200 |
commit | 903283119896f3e054694484da4147788b02ce60 (patch) | |
tree | a3a944649a007e19aa667e13aa023f0dae66c35a /tests/test_everything.py | |
parent | 0fd900d351c8d7d57dc6a1b049ee05f342f6ab1d (diff) | |
download | pygobject-903283119896f3e054694484da4147788b02ce60.tar.gz |
Make callback exception propagation test stricter
Propagating Python exceptions from callbacks through the C context back to the
original caller does not currently happen, is nontrivial/unsafe to implement,
and not desirable at this point any more as by now we have established the
current behaviour. So remove the catching of ZeroDivisionError in the tests.
https://bugzilla.gnome.org/show_bug.cgi?id=616279
Diffstat (limited to 'tests/test_everything.py')
-rw-r--r-- | tests/test_everything.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/tests/test_everything.py b/tests/test_everything.py index b1ba009d..b3635253 100644 --- a/tests/test_everything.py +++ b/tests/test_everything.py @@ -268,10 +268,10 @@ class TestCallbacks(unittest.TestCase): x = 1 / 0 self.fail('unexpected surviving zero divsion:' + str(x)) - try: - Everything.test_simple_callback(callback) - except ZeroDivisionError: - pass + # note that we do NOT expect the ZeroDivisionError to be propagated + # through from the callback, as it crosses the Python<->C boundary + # twice. (See GNOME #616279) + Everything.test_simple_callback(callback) def test_double_callback_exception(self): """ @@ -287,10 +287,10 @@ class TestCallbacks(unittest.TestCase): Everything.test_boolean(False) Everything.test_simple_callback(badcallback()) - try: - Everything.test_simple_callback(callback) - except ZeroDivisionError: - pass + # note that we do NOT expect the ZeroDivisionError to be propagated + # through from the callback, as it crosses the Python<->C boundary + # twice. (See GNOME #616279) + Everything.test_simple_callback(callback) def test_return_value_callback(self): TestCallbacks.called = False |