From 3e4188695fc0f5934933889b1707c17299936ac8 Mon Sep 17 00:00:00 2001 From: Stephan Richter Date: Sun, 27 Jan 2019 16:34:59 -0500 Subject: Make sure that arcs() and lines() only returns distinct line combination values and not one entry for each context. --- coverage/sqldata.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'coverage/sqldata.py') diff --git a/coverage/sqldata.py b/coverage/sqldata.py index 91ad3cd5..8bfb04be 100644 --- a/coverage/sqldata.py +++ b/coverage/sqldata.py @@ -468,7 +468,7 @@ class CoverageSqliteData(SimpleReprMixin): if file_id is None: return None else: - query = "select lineno from line where file_id = ?" + query = "select distinct lineno from line where file_id = ?" data = [file_id] if context is not None: query += " and context_id = ?" @@ -483,7 +483,7 @@ class CoverageSqliteData(SimpleReprMixin): if file_id is None: return None else: - query = "select fromno, tono from arc where file_id = ?" + query = "select distinct fromno, tono from arc where file_id = ?" data = [file_id] if context is not None: query += " and context_id = ?" -- cgit v1.2.1