root: improve test detection

This commit is contained in:
Jens Langhammer 2020-06-19 22:27:20 +02:00
parent e91a8f88a0
commit 14fd137f89
1 changed files with 1 additions and 3 deletions

View File

@ -356,9 +356,7 @@ TEST_OUTPUT_VERBOSE = 2
TEST_OUTPUT_FILE_NAME = "unittest.xml" TEST_OUTPUT_FILE_NAME = "unittest.xml"
if any("test" in arg for arg in sys.argv): if len(sys.argv) >= 2 and sys.argv[1] == "test":
LOGGER.warning("Testing mode enabled, no logging from now on...")
LOGGING = None
TEST = True TEST = True
CELERY_TASK_ALWAYS_EAGER = True CELERY_TASK_ALWAYS_EAGER = True