diff --git a/test.py b/test.py index 582c72e8a534481559c025b2ce6eae392d94ff03..7ae9971e835e9af59084568b13e8753ce026f721 100644 --- a/test.py +++ b/test.py @@ -4,7 +4,9 @@ Run tests for the LTI Consumer XBlock """ import os +import logging import sys +import warnings if __name__ == '__main__': os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'test_settings') @@ -28,6 +30,12 @@ if __name__ == '__main__': settings.INSTALLED_APPS += ('lti_consumer',) + # Suppress logging: it just clutters the test output with error logs that are expected. + logging.disable(logging.CRITICAL) + + # Suppress a warning from XBlock: "IdGenerator will be required in the future in order to support XBlockAsides" + warnings.filterwarnings("ignore", category=FutureWarning, message=r"IdGenerator will be required.*") + arguments = sys.argv[1:] options = [argument for argument in arguments if argument.startswith('-')] paths = [argument for argument in arguments if argument not in options]