diff options
author | Stephan Richter <stephan.richter@gmail.com> | 2019-01-27 16:34:59 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2019-02-17 18:07:24 -0500 |
commit | 3e4188695fc0f5934933889b1707c17299936ac8 (patch) | |
tree | 001f9454c06b21b8b9d7801603c2d9a7561142d7 /coverage | |
parent | f12db7fd4b3ab288f7f770f7138062951feaa6c9 (diff) | |
download | python-coveragepy-git-3e4188695fc0f5934933889b1707c17299936ac8.tar.gz |
Make sure that arcs() and lines() only returns distinct line combination values and not one entry for each context.
Diffstat (limited to 'coverage')
-rw-r--r-- | coverage/sqldata.py | 4 |
1 files changed, 2 insertions, 2 deletions
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 = ?" |