Skip to content

--stepwise should continue from the test aborted with a BdbQuit #10562

Open
@mgedmin

Description

@mgedmin

What's the problem this feature will solve?

I'm trying to change the implementation of a helper function. I made it compute the result using the old method, the new method, and added an if a != b: breakpoint breakpoint to catch the cases where they differ (there shouldn't be any). I'm now running the entire test suite seeing if the breakpoint will trigger.

Since all software is buggy, mine included, the breakpoint does trigger after passing some 300 tests. I get the pdb prompt, I look at the data, I fix the code, I want to run the tests again.

If this were a failing test, pytest --stepwise would let me continue from where I stopped. But this is a debug session that I aborted with (Pdb) q, so pytest thinks that 0 tests failed in the last run and starts from the very beginning.

Describe the solution you'd like

I'd like --stepwise to consider the test that I aborted with a BdbQuit to be failed, so it'll continue from the right place.

Alternative Solutions

I suppose I could try write a separate unit test for each case discovered by my breakpoint, but that sounds tedious and inconvenient (our fixtures involve a database).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions