Workaround for wrong order of repr on s390x
The standard dictionary in Python 3.7 is ordered But it can fail with python2 Simple reproducer: for i in {1..10}; do PYTHONHASHSEED=random python2 -c 'import ldb; msg = ldb.Message(); msg.dn = ldb.Dn(ldb.Ldb(), "dc=foo29"); msg["dc"] = b"foo"; print(repr(msg)) '; done ====================================================================== FAIL: test_repr (__main__.LdbMsgTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "tests/python/api.py", line 2322, in test_repr "Message({'dn': Dn('dc=foo29'), 'dc': MessageElement(['foo'])})") AssertionError: "Message({'dc': MessageElement(['foo']), 'dn': Dn('dc=foo29')})" != "Message({'dn': Dn('dc=foo29'), 'dc': MessageElement(['foo'])})" ---------------------------------------------------------------------- Ran 1025 tests in 29.146s FAILED (failures=1)
This commit is contained in:
parent
5996f46405
commit
2a4d9797fa
@ -182,6 +182,8 @@ doxygen Doxyfile
|
||||
|
||||
%check
|
||||
%{?export_waf_python}
|
||||
# workaround for different order of repr in ldb.Message
|
||||
export PYTHONHASHSEED=0
|
||||
make %{?_smp_mflags} check
|
||||
|
||||
%install
|
||||
|
Loading…
Reference in New Issue
Block a user