bit_array doctest failed with Python 2.7.x
It's due to the way of python 2.x to display value of <type 'long'>
.
vklein@tuono:~/odk/pplpy$ python --version
Python 2.7.12
vklein@tuono:~/odk/pplpy$ python tests/rundoctest.py
Running doctests for pplpy
--------------------------------------------------------------------------------
<module 'ppl' from '/home/vklein/.local/lib/python2.7/site-packages/ppl/__init__.pyc'>
TestResults(failed=0, attempted=34)
--------------------------------------------------------------------------------
<module 'ppl.linear_algebra' from '/home/vklein/.local/lib/python2.7/site-packages/ppl/linear_algebra.so'>
TestResults(failed=0, attempted=187)
--------------------------------------------------------------------------------
<module 'ppl.mip_problem' from '/home/vklein/.local/lib/python2.7/site-packages/ppl/mip_problem.so'>
TestResults(failed=0, attempted=208)
--------------------------------------------------------------------------------
<module 'ppl.polyhedron' from '/home/vklein/.local/lib/python2.7/site-packages/ppl/polyhedron.so'>
TestResults(failed=0, attempted=622)
--------------------------------------------------------------------------------
<module 'ppl.generator' from '/home/vklein/.local/lib/python2.7/site-packages/ppl/generator.so'>
TestResults(failed=0, attempted=245)
--------------------------------------------------------------------------------
<module 'ppl.constraint' from '/home/vklein/.local/lib/python2.7/site-packages/ppl/constraint.so'>
TestResults(failed=0, attempted=252)
--------------------------------------------------------------------------------
**********************************************************************
File "/home/vklein/.local/lib/python2.7/site-packages/ppl/bit_arrays.so", line ?, in ppl.bit_arrays.__test__.Bit_Row.first (line 140)
Failed example:
r.first()
Differences (ndiff with -expected +actual):
- 127
+ 127L
? +
**********************************************************************
File "/home/vklein/.local/lib/python2.7/site-packages/ppl/bit_arrays.so", line ?, in ppl.bit_arrays.__test__.Bit_Row.first (line 140)
Failed example:
r.first()
Differences (ndiff with -expected +actual):
- 2
+ 2L
? +
**********************************************************************
File "/home/vklein/.local/lib/python2.7/site-packages/ppl/bit_arrays.so", line ?, in ppl.bit_arrays.__test__.Bit_Row.first (line 140)
Failed example:
r.first()
Differences (ndiff with -expected +actual):
- 2
+ 2L
? +
**********************************************************************
File "/home/vklein/.local/lib/python2.7/site-packages/ppl/bit_arrays.so", line ?, in ppl.bit_arrays.__test__.Bit_Row.last (line 169)
Failed example:
r.last()
Differences (ndiff with -expected +actual):
- 127
+ 127L
? +
**********************************************************************
File "/home/vklein/.local/lib/python2.7/site-packages/ppl/bit_arrays.so", line ?, in ppl.bit_arrays.__test__.Bit_Row.last (line 169)
Failed example:
r.last()
Differences (ndiff with -expected +actual):
- 127
+ 127L
? +
**********************************************************************
File "/home/vklein/.local/lib/python2.7/site-packages/ppl/bit_arrays.so", line ?, in ppl.bit_arrays.__test__.Bit_Row.last (line 169)
Failed example:
r.last()
Differences (ndiff with -expected +actual):
- 253
+ 253L
? +
**********************************************************************
2 items had failures:
3 of 11 in ppl.bit_arrays.__test__.Bit_Row.first (line 140)
3 of 11 in ppl.bit_arrays.__test__.Bit_Row.last (line 169)
***Test Failed*** 6 failures.
<module 'ppl.bit_arrays' from '/home/vklein/.local/lib/python2.7/site-packages/ppl/bit_arrays.so'>
TestResults(failed=6, attempted=54)
Edited by vinklein