Did something change in Django Test client on v4.0.5 or v4.0.6?

Something weird happened with my tests as soon as I upgraded from Django v4.0.4 to v4.0.6: now the stdout is printing all exceptions it faces (including the ones caught in try-except blocks), as well as any HTTP status code that is not 200. As my project relies a lot on the built-in permission system, the output is super messy.

This is a small example. I have over 500 tests, so the full output is very lengthy.
image

I was unable to find the source of the change. Has anyone else faced this_ Is there’s a parameter that I can use to stop printing that clutter.

I don’t see anything in the release notes that touches the logging or testing. I would try reverting changes locally until it stopped occurring. If you can reproduce it for a single test, it should be a pretty quick process to identify the commit that caused the change. It could also be an environment variable or how the tests are run. It’s a bit difficult to tell from the given information. However, it’s pretty unlikely the issue is with Django.

It’s not a change I’ve made: I went back several commits and the problem persists. If the problem is not Django 4.0.6, then my guess is that it was either a python version change of a subdependency that is wrecking my test client up :frowning: