~ubuntu-branches/ubuntu/wily/nibabel/wily-proposed

« back to all changes in this revision

Viewing changes to nibabel/tests/test_nifti1.py

  • Committer: Package Import Robot
  • Author(s): Yaroslav Halchenko
  • Date: 2012-06-27 14:52:08 UTC
  • mfrom: (1.1.5)
  • Revision ID: package-import@ubuntu.com-20120627145208-qfk290l3soi8xq73
Tags: 1.2.2-1
* New upstream bugfix release
  - addresses import and test failures on power7 (powerpc) causing FTBFS of
    nipy.

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
 
15
15
import numpy as np
16
16
 
17
 
from ..casting import type_info
 
17
from ..casting import type_info, have_binary128
18
18
from ..tmpdirs import InTemporaryDirectory
19
19
from ..spatialimages import HeaderDataError
20
20
from ..affines import from_matvec
309
309
        hdr.write_to(str_io)
310
310
        assert_equal(str_io.getvalue(), hdr.binaryblock + ZEROB * 4)
311
311
 
 
312
    def test_float128(self):
 
313
        hdr = self.header_class()
 
314
        if have_binary128():
 
315
            hdr.set_data_dtype(np.longdouble)
 
316
            assert_equal(hdr.get_data_dtype().type, np.longdouble)
 
317
        else:
 
318
            assert_raises(HeaderDataError, hdr.set_data_dtype, np.longdouble)
 
319
 
312
320
 
313
321
class TestNifti1Image(tana.TestAnalyzeImage):
314
322
    # Run analyze-flavor spatialimage tests