2 This file imports test methods from different testing modules, in this
5 - try importing 'pytest'
6 - if it fails, fallback to 'numpy.testing'
8 Nose2 support was removed because of lacking assertWarns on py2.7.
16 # check if we have pytest
19 parametrize = pytest.mark.parametrize
20 assert_raises = pytest.raises
21 assert_warns = pytest.warns
22 skipTest = pytest.skip
24 def run_module_suite():
30 # otherwise fallback on numpy.testing
32 from numpy.testing import dec, assert_raises, assert_warns
33 from numpy.testing import SkipTest
34 parametrize = dec.parametrize
37 from numpy.testing import run_module_suite
39 # always use numpy's assert_equal
41 assert_equal = numpy.testing.assert_equal