-
Notifications
You must be signed in to change notification settings - Fork 40
Open
Description
python 3.7.1
pytest 4.4.0
pytest-ordering 0.6
there are two testClass, and I find the test will run as order which I set.
import unittest
import pytest
class TestA(unittest.TestCase):
@pytest.mark.run(order=0)
def test_0(self):
pass
@pytest.mark.run(order=2)
def test_2(self):
pass
... #other test_method
class TestB(unittest.TestCase):
@pytest.mark.run(order=1)
def test_1(self):
pass
... #other test_method
run the code, I find the tests run as test_0-->test_1-->test_2.
But, I want to the tests run all test_method in a TestClass and then run another TestClass.
like test_0-->test_2-->test_1, or test_1-->test_0-->test_2.
any way, the design of now is cool。
I think add a param to control the run order only work in a TestClass will be better.
Because the TestA 's setUpClass will run again after run test_1,if setUpClass is time long,will be bad feel.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels