Don't load django.test when not testing
|Reported by:||Collin Anderson||Owned by:||nobody|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
I noticed that
django/contrib/auth/hashers.py is loading the
settings_changed signal from the test suite. This ends up also loading the whole test suite in addition.
All of the other code that handles the
settings_changed signal is kept inside the test suite itself. I assume this code is kept out of the test suite because of the "core shouldn't be aware of contrib" rule. Seems to me it's more important to avoid unnecessarily loading the test suite on a production website.
Yes, I realize this is picky, but we're perfectionists, right?
Change History (15)
comment:8 Changed 4 years ago by
|Summary:||Don't load test suite when not testing → Don't load django.test when not testing|
comment:9 Changed 2 years ago by
|Patch needs improvement:||unset|