From e7b3ea8fabf6324f1298729039332e81c0487b14 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Tue, 14 Mar 2017 17:11:25 -0700 Subject: [PATCH] coverage: Require 100% coverage in analytics. --- tools/test-backend | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tools/test-backend b/tools/test-backend index b1b090d259..f9b8e3538a 100755 --- a/tools/test-backend +++ b/tools/test-backend @@ -17,8 +17,10 @@ from django.conf import settings from django.test.utils import get_runner target_fully_covered = {path for target in [ - 'analytics/tests/*.py', 'analytics/lib/*.py', + 'analytics/models.py', + 'analytics/tests/*.py', + 'analytics/views.py', 'zerver/context_processors.py', 'zerver/lib/alert_words.py', 'zerver/lib/attachments.py', @@ -63,10 +65,12 @@ target_fully_covered = {path for target in [ ] for path in glob.glob(target)} not_yet_fully_covered = { - # Goal is for analytics to have 100% coverage - 'analytics/lib/counts.py', + # Analytics fixtures library is used to generate test fixtures; + # isn't properly accounted for in test coverage analysis since it + # runs before tests. 'analytics/lib/fixtures.py', - 'analytics/lib/time_utils.py', + # We have 100% coverage on the new stuff; need to refactor old stuff. + 'analytics/views.py', # Major lib files should have 100% coverage 'confirmation/models.py', 'zerver/decorator.py',