Skip to content

Commit 8c57780

Browse files
committed
Run tests in ascending order of high-level-ness.
1 parent c71ca40 commit 8c57780

14 files changed

+34
-2
lines changed

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,10 @@
3030
],
3131
zip_safe=False,
3232
extras_require={
33-
"test_minimal": ["pytest"],
33+
"test_minimal": ["pytest", "pytest-order"],
3434
"test_full": [
3535
"pytest",
36+
"pytest-order",
3637
"PyQt5",
3738
"numpy-stl",
3839
"namegenerator",

tests/test_colors.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313

1414
from tests._common import checker
1515

16+
pytestmark = pytest.mark.order(0)
17+
1618
# Target output. Everything below should normalise to this.
1719
RGB, A = (np.array([0.00392157, 1., 0.02745098]), .5)
1820

tests/test_docstrings.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
from unittest import TestCase, skipUnless
66

7+
import pytest
8+
79
from vtkplotlib import PyQt5_AVAILABLE, NUMPY_STL_AVAILABLE
810

911
if PyQt5_AVAILABLE:
@@ -12,6 +14,8 @@
1214

1315
from tests._common import checker, VTKPLOTLIB_WINDOWLESS_TEST
1416

17+
pytestmark = pytest.mark.order(12)
18+
1519

1620
class TestDocs(TestCase):
1721
"""These are automatically extracted from the docstrings."""

tests/test_figures.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414

1515
from tests._common import VTKPLOTLIB_WINDOWLESS_TEST
1616

17+
pytestmark = pytest.mark.order(3)
18+
1719

1820
def test_abstract():
1921
with pytest.raises(Exception):

tests/test_imageio.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
import io
1414

15+
pytestmark = pytest.mark.order(2)
16+
1517

1618
def test_trim_image():
1719

tests/test_interactive.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
from tests._common import checker
1212

13+
pytestmark = pytest.mark.order(10)
14+
1315

1416
@pytest.mark.parametrize("invoker", [vpl.gcf().style, vpl.gcf().iren])
1517
@pytest.mark.parametrize("command", vpl.i.vtkCommands)

tests/test_mesh_plot.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212

1313
path = vpl.data.get_rabbit_stl()
1414

15+
pytestmark = pytest.mark.order(7)
16+
1517

1618
def test_type_normalise():
1719
mesh = numpy_stl().Mesh.from_file(path)

tests/test_misc.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
#encoding: utf-8
22
"""Test the oddities."""
33

4+
import pytest
5+
46
import vtkplotlib as vpl
57

68
from tests._common import requires_interaction
79

10+
pytestmark = pytest.mark.order(4)
11+
812

913
def test_data():
1014
vpl.data.assert_ok()

tests/test_plots.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
from tests._common import checker, numpy_stl
1010

11+
pytestmark = pytest.mark.order(8)
12+
1113

1214
@checker()
1315
def test_arrow():

tests/test_plots_2d.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
from tests._common import checker
1212

13+
pytestmark = pytest.mark.order(9)
14+
1315

1416
@checker()
1517
def test_legend():

0 commit comments

Comments
 (0)