nibabel
nibabel copied to clipboard
AssertionError on WSL1
Getting the same thing on WSL (with current master):
(base) me@christop:~/workspace/nibabel$ PYTHONPATH=. nosetests -s -v nibabel/tests/test_floating.py
nibabel.tests.test_floating.test_type_info ... ok
nibabel.tests.test_floating.test_nmant ... ok
nibabel.tests.test_floating.test_check_nmant_nexp ... /home/me/workspace/nibabel/nibabel/casting.py:360: RuntimeWarning: overflow encountered in power
not np.isfinite(two ** maxexp))
FAIL
nibabel.tests.test_floating.test_as_int ... FAIL
nibabel.tests.test_floating.test_int_to_float ... FAIL
nibabel.tests.test_floating.test_as_int_np_fix ... ok
nibabel.tests.test_floating.test_floor_exact_16 ... ok
nibabel.tests.test_floating.test_floor_exact_64 ... ok
nibabel.tests.test_floating.test_floor_exact ... FAIL
nibabel.tests.test_floating.test_usable_binary128 ... ok
======================================================================
FAIL: nibabel.tests.test_floating.test_check_nmant_nexp
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/me/anaconda3/lib/python3.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/home/me/workspace/nibabel/nibabel/tests/test_floating.py", line 108, in test_check_nmant_nexp
assert_true(_check_nmant(t, ti['nmant']))
AssertionError: False is not true
======================================================================
FAIL: nibabel.tests.test_floating.test_as_int
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/me/anaconda3/lib/python3.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/home/me/workspace/nibabel/nibabel/tests/test_floating.py", line 133, in test_as_int
assert_equal(as_int(v), 2**(nmant + 1) - 1)
AssertionError: 18446744073709551616 != 18446744073709551615
======================================================================
FAIL: nibabel.tests.test_floating.test_int_to_float
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/me/anaconda3/lib/python3.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/home/me/workspace/nibabel/nibabel/tests/test_floating.py", line 183, in test_int_to_float
assert_equal(as_int(int_to_float(i, LD)), i)
AssertionError: 18446744073709551616 != 18446744073709551615
======================================================================
FAIL: nibabel.tests.test_floating.test_floor_exact
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/me/anaconda3/lib/python3.7/site-packages/nose/case.py", line 197, in runTest
self.test(*self.arg)
File "/home/me/workspace/nibabel/nibabel/tests/test_floating.py", line 252, in test_floor_exact
assert_equal(func(iv - 1, t), iv - 1)
File "/home/me/workspace/nibabel/nibabel/tests/test_floating.py", line 234, in <lambda>
int_flex = lambda x, t: as_int(floor_exact(x, t))
File "/home/me/workspace/nibabel/nibabel/casting.py", line 517, in floor_exact
assert biggest_gap > 1
AssertionError
----------------------------------------------------------------------
Ran 10 tests in 0.156s
FAILED (failures=4)
(base) me@christop:~/workspace/nibabel$ uname -a
Linux christop 4.4.0-18362-Microsoft #1-Microsoft Mon Mar 18 12:02:00 PST 2019 x86_64 x86_64 x86_64 GNU/Linux
Originally posted by @chrisgorgo in https://github.com/nipy/nibabel/issues/76#issuecomment-552539668
TODO - test on WSL2