Skip to content
Snippets Groups Projects
Commit e3f185dd authored by Brandon Rodriguez's avatar Brandon Rodriguez
Browse files

Update settings for proper debug output with both testing methods

parent a3074947
Branches
import sys
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
......@@ -40,3 +44,15 @@ DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'
# This should normally be False for tests, but since these tests are testing
# a tool used for development and debugging, it must be True.
DEBUG = True
# Suppress or show testcase debug printout, based on UnitTest execution method.
if 'pytest' in sys.modules:
# Running Pytest env.
# Pytest only shows console output on test failure, so we want it on.
DJANGO_EXPANDED_TESTCASES_DEBUG_PRINT = True
else:
# Running other testing env (mostly likely "django manage.py test").
# manage.py shows all console output always, even on success.
# So we want it off to avoid information overload and spam.
DJANGO_EXPANDED_TESTCASES_DEBUG_PRINT = False
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment