ftobia/pytest-ordering

Custom markers

Opened this issue · 1 comments

As discussed on stack overflow, this is a request for new feature to define custom markers.
We need to consider the trailing digits of the marker as the ordering.
E.g If I say @pytest.mark.custom1 or @pytest.mark.custom(order=1) , then 1 should be the order.
Thank you!

This sounds sane and pretty straightforward. Any marker that ends in one or more digits will be considered orderable. It will create a group that is the marker's name minus the trailing digits.

Looking over my tests, I've punted so far on support for groups. See also #8.

Can you describe your use case with respect to that ticket and this one? I think it would help move the API in the right direction. Specifically, do you foresee cases where you'll have multiple groups? Or would you only ever want one group to be ordered?