History

[tests] update _tools

Paul Brossier committed 8 years ago

Commit 01d56c11 parent bee94451 file · +1 −4Browse files

Showing the changes to python/tests (1 of 1 file). Show all

Unified · Split

python/tests/_tools.py+1−4
@@ -21,18 +21,16 @@ if 'nose2' in sys.modules: · 20 unmodified lines
21 assert_warns = such.helper.assertWarns21 assert_warns = such.helper.assertWarns
22 skipTest = such.helper.skipTest22 skipTest = such.helper.skipTest
23 _has_nose2 = True23 _has_nose2 = True
24 print ('using nose2')
25 24
26# otherwise, check if we have pytest25# otherwise, check if we have pytest
27if not _has_nose2:26if not _has_nose2:
28 try:27 try:
29 import pytest28 import pytest
30 parametrize = pytest.mark.parametrize29 parametrize = pytest.mark.parametrize
31 _has_pytest = True
32 assert_raises = pytest.raises30 assert_raises = pytest.raises
33 assert_warns = pytest.warns31 assert_warns = pytest.warns
34 skipTest = pytest.skip32 skipTest = pytest.skip
35 print ('using pytest')33 _has_pytest = True
36 except:34 except:
37 pass35 pass
38 36
@@ -43,7 +41,6 @@ if not _has_pytest and not _has_nose2: · 4 unmodified lines
43 parametrize = dec.parametrize41 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_equal45# always use numpy's assert_equal
49import numpy46import numpy

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t