#20349: Don't load test suite when not testing
--------------------------------------+------------------------------------
Reporter: CollinAnderson | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Testing framework | Version: 1.5
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+------------------------------------
Comment (by carljm):
This pull request clearly can't work as written, since `HASHERS` and
`PREFERRED_HASHER` don't exist in `django.test.signals`, so they can't be
`global`ed there.
We need to decide if `settings_changed` is meant to be a generally-
supported framework feature, or a test-only feature. If the former, then
it should be moved out of `django.test.signals`. If the latter, then
fixing this bug is complicated; we'd need a hook in the test runner to
allow apps to contribute stuff (like `settings_changed` signal
registrations) to `setup_test_environment`. Or an `UNDER_TEST` setting, so
that code like this can make the import and signal registration
conditional on `UNDER_TEST`. Or just live with the fact that `django.test`
is imported in production.
--
Ticket URL: <https://code.djangoproject.com/ticket/20349#comment:4>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.