ftobia/pytest-ordering

pytest ordering is not working if order of test are more than 127

Closed this issue · 5 comments

Hi,

I'm using below marker to order my pytest test but ordering is not working after 127 and if I mark test as 128 then execution comes directly to 128 without executing previous tests

@pytest.mark.run(order=1)

If possible, can you try installing the latest tip (https://github.com/ftobia/pytest-ordering/tree/13f27a0501799b6c3c1df4b05100017d3fcb90a3) and see if that code works? I think the previous sorting implementation relied on dictionaries with small integer keys being sorted according to their key.

If that solves your problem I'll publish another release to pypi.

Kind of. There is new code in the repo that I haven't released yet (because I haven't tested it out yet myself).

Try installing it with pip install git+https://github.com/ftobia/pytest-ordering.git@13f27a0501799b6c3c1df4b05100017d3fcb90a3 and let me know if that solves your problem. If it does I'll push an 0.5 release to pypi.

Hi,

I had the same problem. Installed your latest and it seemed to do the trick! Please push it 👍 !

Before:
decorator_test.py::test_order_1_retry PASSED
decorator_test.py::test_order_2 PASSED
decorator_test.py::test_order_3_retry PASSED
decorator_test.py::TestBar::test_order_4 PASSED
decorator_test.py::test_order_70 PASSED
decorator_test.py::test_order_1000 PASSED
decorator_test.py::test_order_10 PASSED
decorator_test.py::test_order_10000 PASSED

** After (working) ***
decorator_test.py::test_order_1_retry PASSED
decorator_test.py::test_order_2 PASSED
decorator_test.py::test_order_3_retry PASSED
decorator_test.py::TestBar::test_order_4 PASSED
decorator_test.py::test_order_10 PASSED
decorator_test.py::test_order_70 PASSED
decorator_test.py::test_order_100 PASSED
decorator_test.py::test_order_600_retry PASSED
decorator_test.py::test_order_601 PASSED
decorator_test.py::test_order_1000 PASSED
decorator_test.py::test_order_10000 PASSED

I uploaded 0.5 to pypi. Let me know if that doesn't fix this issue.