GNOME Bugzilla – Bug 730411
Unexpected successes in test suite
Last modified: 2014-05-26 10:54:22 UTC
Test suite of pygobject 3.12.1 fails with Python >=3.4 due to unexpected successes (present with all versions of Python): ... test_object_full_inout (test_gi.TestGObject) ... unexpected success ... test_notify_signal_info_with_obj (test_repository.Test) ... unexpected success ... test_signal_info (test_repository.Test) ... unexpected success ... ---------------------------------------------------------------------- Ran 963 tests in 16.963s FAILED (skipped=1, expected failures=6, unexpected successes=3) Unexpected successes cause non-zero exit status with Python >=3.4: $ cat test.py import unittest class A(unittest.TestCase): @unittest.expectedFailure def test(self): pass unittest.main() $ python3.3 test.py u ---------------------------------------------------------------------- Ran 1 test in 0.001s OK (unexpected successes=1) $ echo $? 0 $ python3.4 test.py u ---------------------------------------------------------------------- Ran 1 test in 0.000s FAILED (unexpected successes=1) $ echo $? 1 $
Thanks for the bug report. I think the problem here is these tests required fixes to GI which have gone in. We can either: 1) Remove the expectedFailure decorator and bump our version dependency for GI/GLib to a version which has the needed fixes. 2) Conditionalize the tests by using skipUnless specifying the require version of GI/GLib the tests work on (this is the preferred method as it ensures PyGI continues building on older systems).
Fixed with: https://git.gnome.org/browse/pygobject/commit/?id=382bb7e