PyTest: no random order



pytest -p no:random-order -v


examples/pytest/py3/conftest.py
#import pytest

def pytest_addoption(parser):
    parser.addoption("--demo")

#@pytest.fixture
#def demo(request):
#    return request.config.getoption("--demo")

examples/pytest/py3/test_one.py
import pytest

@pytest.fixture
def mydemo(request):
    demo = request.config.getoption("--demo")
    print(f"In fixture {demo}")
    return demo


def test_me(mydemo):
    print(f"In test {mydemo}")