When a test method is wrapped using a decorator, it has attribute __code__.co_firstlineno of the decorator, not of the original method. This causes wrong sorting order of the test cases.
__code__.co_firstlineno
Hello @pviktori
Could you take a look at the proposed change? The wrong sorting order of test cases causes false failures in IPA nightly tests, like this one: https://pagure.io/freeipa/issue/8922
Looks good.
Would you like to be a (co)maintainer in this project?
Pull-Request has been merged by pviktori
Released 0.6.0 to PyPI and Fedora Rawhide.
Great, thank you!
When a test method is wrapped using a decorator, it has attribute
__code__.co_firstlinenoof the decorator, not of the original method.This causes wrong sorting order of the test cases.