After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 730411 - Unexpected successes in test suite
Unexpected successes in test suite
Status: RESOLVED FIXED
Product: pygobject
Classification: Bindings
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2014-05-20 00:18 UTC by Arfrever Frehtes Taifersar Arahesis
Modified: 2014-05-26 10:54 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Arfrever Frehtes Taifersar Arahesis 2014-05-20 00:18:40 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
$
Comment 1 Simon Feltman 2014-05-20 21:57:22 UTC
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).
Comment 2 Simon Feltman 2014-05-26 10:54:22 UTC
Fixed with:
https://git.gnome.org/browse/pygobject/commit/?id=382bb7e