[py-dev] Running the least run test

Antonio Cuni anto.cuni at gmail.com
Thu May 20 14:01:49 CEST 2010


On 17/05/10 19:18, holger krekel wrote:

>> 2) If I have a number of tests (let's say a1 to a5), and I aborted the test
>> during the running of test a3, is it possible for the next invocation of
>> py.test to remember where it got to, and start running again at test a4?
>
> Rerunning the last failure(s) and continuing on would probably be nice.
> It's not possible currently, requires adding some persistence
> between py.test invocations.  Could you also create an issue?
>
> If you or somebody else has anything to add or to suggest, shoot :)

some time ago I implemented such a feature without any need to add 
persistence: basically, I assigned a progressive number to each test (printed 
on failure) and added an option to skip the first N.

In combination with -x it did exactly what Simon described, but unfortunately 
I lost the code during an svn up.  I think it can be a good quick&dirty 
solution, while waiting for the proper one with persistence between runs.

ciao,
Anto



More information about the Pytest-dev mailing list