Fueled / django-init

Project template used at Fueled for scaffolding new Django based projects. :dizzy:
Other
189 stars 46 forks source link

PyTest: Run failed test and then new test cases first #414

Closed theskumar closed 4 years ago

theskumar commented 4 years ago

Add default parameter to pytest while running test via cli so that the last failed test are run first and then all the recently modified test are run in cronological order.

Why was this change necessary?

This saves time running test as the failed test are run first or the recently modified. The failure is caught early, as the successful test or old tests are run later at the end.

How does it address the problem?

Adds default argurements --failed-first / --ff and --new-first / --nf to PyTest.

Are there any side effects?

Not that I can think of. It changes the order of test execution. Currently the test are run as they are discovered on the disk, most likely alphabetically.