Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doesn't seem to work with pytest's --pdb mode #22

Closed
risicle opened this issue Mar 23, 2020 · 8 comments · Fixed by #34
Closed

Doesn't seem to work with pytest's --pdb mode #22

risicle opened this issue Mar 23, 2020 · 8 comments · Fixed by #34
Labels
bug Something isn't working

Comments

@risicle
Copy link

risicle commented Mar 23, 2020

With pytest 5.4.1 & pytest-subtests 0.3.0, assertion failures in subtests don't invoke pdb for me. Assertion failures in the parent test do though.

@nicoddemus
Copy link
Member

Thanks @risicle for the report!

@nicoddemus nicoddemus added the bug Something isn't working label Mar 26, 2020
@reaperhulk
Copy link
Contributor

As pyca/cryptography switches over to subtests (which significantly improve our test performance!) it'd be great if this issue could be resolved. 😄 I don't understand the internals of this system well enough to fix it, but I'd be happy to put up some money to get this fixed, either directly to the author or a charitable donation to a 501(c)3 of their choosing.

@nicoddemus
Copy link
Member

Hi @reaperhulk,

Thanks for the ping. I've not had much time to work on this in general, that's why this has staled a bit.

Thanks for the donation offer, I appreciate it, but it's not necessary for now. I will try to get to this soon to see how hard it is to fix it.

Btw could you share more about pyca/cryptography using this? It might be worth sharing your experience in pytest-dev/pytest#1367, where we discuss merging the subtests support in the core.

@alex
Copy link
Contributor

alex commented Dec 9, 2020

pyca/cryptography@b3540ec is basically how we're using it -- replacing very large (1000s of tests) parameterizes with subtests. Our motivation here is performance.

@nicoddemus
Copy link
Member

And did you see any improvements? If so, in collection, runtime, or both?

@reaperhulk
Copy link
Contributor

There's a lot of noise in our CI measurements, but we're seeing improvements in total wall-clock time of ~20-30% across our full test suite. Collection time is vastly improved, but much of that is just because it's done lazily now. This might make pytest-xdist feasible for us though since previously collection was very expensive.

@nicoddemus
Copy link
Member

Cool, thanks for sharing. 👍

nicoddemus added a commit to nicoddemus/pytest-subtests that referenced this issue Dec 13, 2020
@nicoddemus
Copy link
Member

0.4.0 is out. 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants