Replies: 2 comments 6 replies
-
That is actually an interesting case. class Testa02:
@pytest.mark.order(
index=3,
after="test_b/test_b1.py::Testb01::test_01"
)
def test_01(self):
pass
@pytest.mark.order(2)
def test_02(self):
pass
@pytest.mark.order(1)
def test_03(self):
pass This ensures that A few notes:
|
Beta Was this translation helpful? Give feedback.
-
sorry ,I use pip install pytest-order, this version cant work it. virsion=1.0.0
***@***.***
From: mrbean-bremen
Date: 2021-06-08 03:04
To: pytest-dev/pytest-order
CC: tianya; Mention
Subject: Re: [pytest-dev/pytest-order] Sort both the test class and the test method (#44)
With current master, this should also work:
@pytest.mark.order(after="test_b/test_b1.py::Testb01")
class Testa02:
@pytest.mark.order(3)
def test_01(self):
pass
@pytest.mark.order(2)
def test_02(self):
pass
@pytest.mark.order(1)
def test_03(self):
pass
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
Beta Was this translation helpful? Give feedback.
-
I have a scene like this,
now:
test_a/test_a1.py::Testa01::test_03
test_a/test_a1.py::Testa01::test_02
test_a/test_a1.py::Testa01::test_01
test_a/test_a2.py::Testa02::test_03
test_a/test_a2.py::Testa02::test_02
test_a/test_a2.py::Testa02::test_01
test_b/test_b1.py::Testb01::test_03
test_b/test_b1.py::Testb01::test_02
test_b/test_b1.py::Testb01::test_01
test_b/test_b2.py::Testb02::test_03
test_b/test_b2.py::Testb02::test_02
test_b/test_b2.py::Testb02::test_01
except:
test_a/test_a1.py::Testa01::test_03
test_a/test_a1.py::Testa01::test_02
test_a/test_a1.py::Testa01::test_01
test_b/test_b1.py::Testb01::test_03
test_b/test_b1.py::Testb01::test_02
test_b/test_b1.py::Testb01::test_01
test_a/test_a2.py::Testa02::test_03
test_a/test_a2.py::Testa02::test_02
test_a/test_a2.py::Testa02::test_01
test_b/test_b2.py::Testb02::test_03
test_b/test_b2.py::Testb02::test_02
test_b/test_b2.py::Testb02::test_01
Beta Was this translation helpful? Give feedback.
All reactions