Skip to content
Snippets Groups Projects
Commit a48c8d07 authored by Martin Reinecke's avatar Martin Reinecke
Browse files

skip SHT tests if pyHealpix is not available

parent 6bee5eda
Branches
Tags
1 merge request!68Martin's monster merge part 5/N: final cleanups, fixes and new testcases
Pipeline #
...@@ -22,6 +22,7 @@ import numpy as np ...@@ -22,6 +22,7 @@ import numpy as np
from numpy.testing import assert_,\ from numpy.testing import assert_,\
assert_equal, \ assert_equal, \
assert_allclose assert_allclose
from nifty.config import dependency_injector as di
from nifty import Field,\ from nifty import Field,\
RGSpace,\ RGSpace,\
...@@ -32,6 +33,8 @@ from nifty import Field,\ ...@@ -32,6 +33,8 @@ from nifty import Field,\
LMGLTransformation, \ LMGLTransformation, \
FFTOperator FFTOperator
from nose.plugins.skip import SkipTest
class Misc_Tests(unittest.TestCase): class Misc_Tests(unittest.TestCase):
def test_RG_distance_1D(self): def test_RG_distance_1D(self):
for dim1 in [10,11]: for dim1 in [10,11]:
...@@ -43,7 +46,7 @@ class Misc_Tests(unittest.TestCase): ...@@ -43,7 +46,7 @@ class Misc_Tests(unittest.TestCase):
def test_RG_distance_2D(self): def test_RG_distance_2D(self):
for dim1 in [10,11]: for dim1 in [10,11]:
for dim2 in [9, 28]: for dim2 in [9,28]:
for zc1 in [False,True]: for zc1 in [False,True]:
for zc2 in [False,True]: for zc2 in [False,True]:
for d in [0.1,1,3.7]: for d in [0.1,1,3.7]:
...@@ -81,6 +84,8 @@ class Misc_Tests(unittest.TestCase): ...@@ -81,6 +84,8 @@ class Misc_Tests(unittest.TestCase):
assert_allclose(inp.val, out.val) assert_allclose(inp.val, out.val)
def test_sht(self): def test_sht(self):
if 'pyHealpix' not in di:
raise SkipTest
for lm in [0,3,6,11,30]: for lm in [0,3,6,11,30]:
for tp in [np.float64,np.complex128,np.float32,np.complex64]: for tp in [np.float64,np.complex128,np.float32,np.complex64]:
a = LMSpace(lmax=lm) a = LMSpace(lmax=lm)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment