I want to run some test by order, and i use pytest-ordering follow the offical article, but the order not change at all?
import pytest
@pytest.mark.run(after='test_second')
def test_third():
assert True
def test_second():
assert True
@pytest.mark.run(before='test_second')
def test_first():
assert True
It should be test_first, test_second, test_third order.
But The order don't change at all ???
E:\QT-learn>pytest -svv
============================================================================= test session starts =============================================================================
platform win32 -- Python 3.7.4, pytest-5.4.3, py-1.9.0, pluggy-0.13.1 -- c:\users\jekoie\appdata\local\programs\python\python37-32\python.exe
cachedir: .pytest_cache
rootdir: E:\QT-learn, inifile: pytest.ini
plugins: ordering-0.6
collected 3 items
test_qt.py::test_third PASSED
test_qt.py::test_second PASSED
test_qt.py::test_first PASSED
============================================================================== 3 passed in 0.04s ==============================================================================
E:\QT-learn>