[TIP] pytest --sw starting point

Fabian Cenedese Cenedese at indel.ch
Fri Oct 21 01:54:14 PDT 2022


Hi

I was wondering if there's a way to start the normal test collection
but skip the first few tests. It happens that I call pytest --sw and
then have to CTRL-C it (for some external reason). The next time
it starts from the beginning but I'd rather continue where I stopped it.

Something like
pytest --startfrom test_file4.py::test_37 (--sw)

And then it skips the tests that would have been executed before
this test and jumps right here, continuing on until the end.

Is this possible? If not is there a workaround, no matter how crude?

Thanks

bye  Fabi




More information about the testing-in-python mailing list