Pytest runs the test in the same order as they are found in the test module:

examples/pytest/test_order.py
def test_one():
    assert True

def test_two():
    assert True

def test_three():
    assert True

test_order.py::test_one PASSED
test_order.py::test_two PASSED
test_order.py::test_three PASSED