Skip to content

Commit

Permalink
TST: Compatibility with Python 3. Explaining what this test is for.
Browse files Browse the repository at this point in the history
  • Loading branch information
arokem committed Dec 21, 2015
1 parent 2cfdad1 commit 5287096
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion dipy/core/tests/test_gradients.py
Expand Up @@ -186,8 +186,15 @@ def test_qvalues():


def test_nan_bvecs():
"""
Test that the presence of nan's in b-vectors doesn't raise warnings.
In previous versions, the presence of NaN in b-vectors was taken to
indicate a 0 b-value, but also raised a warning when testing for the length
of these vectors. This checks that it doesn't happen.
"""
fdata, fbvals, fbvecs = get_data()
with warnings.catch_warnings(True) as w:
with warnings.catch_warnings(record=True) as w:
gtab = gradient_table(fbvals, fbvecs)
npt.assert_(len(w) == 0)

Expand Down

0 comments on commit 5287096

Please sign in to comment.