Skip to content

Failing assert biggest_gap > 1 on big-endian while unittesting #76

Closed
@yarikoptic

Description

@yarikoptic

I was troubleshooting pymvpa test/build-failures on some exotic architectures and decided to test nibabel as well on s390 (big-endian AFAIK) and got new failure (first in that cleaner-array-writers PR#73 branch and then verified in master, thus just filing a bug report):

test_to_from_fileobj (nibabel.tests.test_wrapstruct.TestWrapStruct) ... ok

======================================================================
FAIL: nibabel.tests.test_floating.test_floor_exact
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.7/nose/case.py", line 187, in runTest
    self.test(*self.arg)
  File "/home/yoh/nibabel/nibabel/tests/test_floating.py", line 97, in test_floor_exact
    assert_equal(int_flex(iv-1, t), iv-1)
  File "/home/yoh/nibabel/nibabel/tests/test_floating.py", line 87, in <lambda>
    int_flex = lambda x, t : as_int(floor_exact(x, t))
  File "/home/yoh/nibabel/nibabel/casting.py", line 356, in floor_exact
    assert biggest_gap > 1
AssertionError

pdb-ing

-> assert biggest_gap > 1
(Pdb) print biggest_gap
0.015625
(Pdb) print val
162259276829213363391578010288127
(Pdb) print flt_type
<type 'numpy.float128'>
(Pdb) print biggest_gap
0.015625

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions