Skip to content

Conversation

emin63
Copy link

@emin63 emin63 commented Aug 23, 2025

This is a simple patch to make it so that if you run pytest with -vvv and you have unexpected output in stderr when testing the notebook, you will see the contents of stderr.

Without this patch, you just get a test failure telling you:

     Unexpected output fields from running code: {'stderr'}

but without showing you what is in stderr. This can be annoying if you are running an a CI environment like GitHub which has a different environment than your local system and is harder to debug minor warnings or other errors.

@takluyver
Copy link
Member

I think something like this makes sense, though I wonder if we want to show it at a lower verbosity level than -vvv, or even by default. It might also be necessary to do something about very long outputs.

@emin63
Copy link
Author

emin63 commented Oct 14, 2025

I think something like this makes sense, though I wonder if we want to show it at a lower verbosity level than -vvv, or even by default. It might also be necessary to do something about very long outputs.

I don't have a view either way on those.

Did you want some other changes to this PR or is there something preventing you from merging this and then making a decision on those issues later? I keep ending up copying this patch to multiple systems I am using. So getting this merged sooner would be my preference if possible.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants