Unified · Split
| @@ -21,18 +21,16 @@ if 'nose2' in sys.modules: · 20 unmodified lines | |||
| 21 | assert_warns = such.helper.assertWarns | 21 | assert_warns = such.helper.assertWarns |
| 22 | skipTest = such.helper.skipTest | 22 | skipTest = such.helper.skipTest |
| 23 | _has_nose2 = True | 23 | _has_nose2 = True |
| 24 | print ('using nose2') | ||
| 25 | 24 | ||
| 26 | # otherwise, check if we have pytest | 25 | # otherwise, check if we have pytest |
| 27 | if not _has_nose2: | 26 | if not _has_nose2: |
| 28 | try: | 27 | try: |
| 29 | import pytest | 28 | import pytest |
| 30 | parametrize = pytest.mark.parametrize | 29 | parametrize = pytest.mark.parametrize |
| 31 | _has_pytest = True | ||
| 32 | assert_raises = pytest.raises | 30 | assert_raises = pytest.raises |
| 33 | assert_warns = pytest.warns | 31 | assert_warns = pytest.warns |
| 34 | skipTest = pytest.skip | 32 | skipTest = pytest.skip |
| 35 | print ('using pytest') | 33 | _has_pytest = True |
| 36 | except: | 34 | except: |
| 37 | pass | 35 | pass |
| 38 | 36 | ||
| @@ -43,7 +41,6 @@ if not _has_pytest and not _has_nose2: · 4 unmodified lines | |||
| 43 | parametrize = dec.parametrize | 41 | parametrize = dec.parametrize |
| 44 | def skipTest(msg): | 42 | def skipTest(msg): |
| 45 | raise SkipTest(msg) | 43 | raise SkipTest(msg) |
| 46 | print ('using numpy') | ||
| 47 | 44 | ||
| 48 | # always use numpy's assert_equal | 45 | # always use numpy's assert_equal |
| 49 | import numpy | 46 | import numpy |