Timeline for How to rerun a specific pytest test, based on the output error
Current License: CC BY-SA 4.0
Post Revisions
6 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| 4 hours ago | comment | added | Peter Mortensen |
--lf (an alias of --last-failed) is documented in How to rerun failed tests and maintain state between test runs. See also this answer.
|
|
| 6 hours ago | history | edited | Peter Mortensen | CC BY-SA 4.0 |
Active reading [<https://en.wiktionary.org/wiki/rerun#Verb> <https://en.wikipedia.org/wiki/Appium>].
|
| Nov 27, 2020 at 13:23 | answer | added | Nahidur Rahman | timeline score: 1 | |
| Nov 27, 2020 at 13:19 | comment | added | hoefling |
pytest --lf will rerun all tests that failed in the previous run (lf = "last failed"). pytest --lf -x will rerun only the first test that has failed in the previous run. If you want to run a specific test, pass its node ID as parameter, e.g. pytest tests/test_module.py::test_func_name. The node IDs of the failed tests are printed in a special section at the end of the output.
|
|
| Nov 27, 2020 at 12:06 | review | First posts | |||
| Nov 27, 2020 at 13:15 | |||||
| Nov 27, 2020 at 12:02 | history | asked | Mohammed numan ali | CC BY-SA 4.0 |