[pytest-dev] Keeping failing test ids for git bisect

Florian Schulze florian.schulze at gmx.net
Thu May 2 06:18:11 EDT 2019

On 2 May 2019, at 11:28, Florian Bruhin wrote:

> Hey,
> On Thu, May 02, 2019 at 11:22:08AM +0200, Florian Schulze wrote:
>> Is there a way to run a bunch of tests like with --lf but don't clear
>> the cache when they pass? This would be mighty helpful for git
>> bisect.
>> For now I helped myself by copying the test ids, but that requires
>> editing the list copied from the terminal before being able to paste
>> them to the command line.
> I've needed something similar before (like when I want to run a set of
> failing
> tests, but maybe run some other set in between).
> What would be nice is something like a --save-collected <name> and
> --load-collected <name>. Then you could do "--lf --save-collected
> bisect" once,
> and do "--load-collected bisect" to rerun exactly those tests.
> I wanted to write a plugin for that for months (if not years) now, but
> never
> got around to it. So far I've also done what you described.

Any hints on which hooks would be most useful for gathering the failing
tests (or maybe a hint for existing code to look at)? Then I might write
that plugin :)

Florian Schulze

More information about the pytest-dev mailing list