Commits

Mikhail Korobov committed e0d6a51

make COVERAGE_USE_STDOUT backwards-compatible

Comments (0)

Files changed (2)

django_coverage/coverage_runner.py

 except ImportError:
     msg = """
 
-    django-coverage 1.1 requires django 1.2+.
+    django-coverage 1.1+ requires django 1.2+.
     Please use django-coverage 1.0.3 if you have django 1.1 or django 1.0
     """
     raise Exception(msg)

django_coverage/settings.py

 
 # True => Always output coverage reports to STDOUT.
 # False => Don't output coverage reports to STDOUT.
+# (not set) => output coverage reports to STDOUT only if COVERAGE_REPORT_HTML_OUTPUT_DIR is not set or None.
 #
 # This makes it possible to both generate HTML reports and see coverage
 # information on STDOUT.
-COVERAGE_USE_STDOUT = getattr(settings, 'COVERAGE_USE_STDOUT', True)
+COVERAGE_USE_STDOUT = getattr(settings, 'COVERAGE_USE_STDOUT', COVERAGE_REPORT_HTML_OUTPUT_DIR is None)