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 690837 - test for must match definition
test for must match definition
Product: pygobject
Classification: Bindings
Component: general
Other Linux
: Normal normal
: ---
Assigned To: Nobody's working on this now (help wanted and appreciated)
Python bindings maintainers
Depends on:
Reported: 2012-12-28 21:35 UTC by Dan Horák
Modified: 2012-12-30 10:35 UTC
See Also:
GNOME target: ---
GNOME version: ---

fix test (1.23 KB, patch)
2012-12-28 21:35 UTC, Dan Horák
none Details | Review

Description Dan Horák 2012-12-28 21:35:09 UTC
Created attachment 232352 [details] [review]
fix test

memcmp() as underlaying function for the method can return other values than the "expected" -1, 0 and 1. The result is defined as equal to, less than or greater than zero. The result for the compare() method in glib's GBytes is defined in the same way.

a test failure from s390/s390x architecture in Fedora 19

FAIL: test_compare (test_gi.TestGBytes)
Traceback (most recent call last):
  • File "/builddir/build/BUILD/pygobject-3.7.3/tests/", line 1046 in test_compare
AssertionError: -1 != -2

Comment 1 Martin Pitt 2012-12-30 10:35:33 UTC
Thank you! I modified the patch to use the richer unittest comparison functions: