Skip to content

Commit be19d71

Browse files
committed
TST: skip tests on Py3 for modules that have not been ported
1 parent 29a9460 commit be19d71

File tree

3 files changed

+22
-3
lines changed

3 files changed

+22
-3
lines changed

numpydoc/tests/test_phantom_import.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
from __future__ import division, absolute_import, print_function
22

3-
import numpydoc.phantom_import
3+
import sys
4+
from nose import SkipTest
5+
6+
def test_import():
7+
if sys.version_info[0] >= 3:
8+
raise SkipTest("phantom_import not ported to Py3")
9+
10+
import numpydoc.phantom_import
411

512
# No tests at the moment...

numpydoc/tests/test_plot_directive.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
from __future__ import division, absolute_import, print_function
22

3-
import numpydoc.plot_directive
3+
import sys
4+
from nose import SkipTest
5+
6+
def test_import():
7+
if sys.version_info[0] >= 3:
8+
raise SkipTest("plot_directive not ported to Python 3 (use the one from Matplotlib instead)")
9+
import numpydoc.plot_directive
410

511
# No tests at the moment...

numpydoc/tests/test_traitsdoc.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
from __future__ import division, absolute_import, print_function
22

3-
import numpydoc.traitsdoc
3+
import sys
4+
from nose import SkipTest
5+
6+
def test_import():
7+
if sys.version_info[0] >= 3:
8+
raise SkipTest("traitsdoc not ported to Python3")
9+
import numpydoc.traitsdoc
410

511
# No tests at the moment...

0 commit comments

Comments
 (0)