summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2021-02-21 22:15:01 -0500
committerNed Batchelder <ned@nedbatchelder.com>2021-02-21 22:15:01 -0500
commitcc5d85741ab33a84adb33400ecfcccd70e449a4a (patch)
tree250fc4c552c4da252d5de33f0300d7a226a2f6b5 /tests
parent72baa75af0db9455ae981731897957872c8cc6bb (diff)
downloadpython-coveragepy-git-cc5d85741ab33a84adb33400ecfcccd70e449a4a.tar.gz
refactor: slightly better coverage in coveragetest
Diffstat (limited to 'tests')
-rw-r--r--tests/coveragetest.py6
-rw-r--r--tests/helpers.py2
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/coveragetest.py b/tests/coveragetest.py
index 8e5f2b0a..9b7fe167 100644
--- a/tests/coveragetest.py
+++ b/tests/coveragetest.py
@@ -125,7 +125,7 @@ class CoverageTest(
def check_coverage(
self, text, lines=None, missing="", report="",
excludes=None, partials="",
- arcz=None, arcz_missing="", arcz_unpredicted="",
+ arcz=None, arcz_missing=None, arcz_unpredicted=None,
arcs=None, arcs_missing=None, arcs_unpredicted=None,
):
"""Check the coverage measurement of `text`.
@@ -154,9 +154,9 @@ class CoverageTest(
if arcs is None and arcz is not None:
arcs = arcz_to_arcs(arcz)
- if arcs_missing is None:
+ if arcs_missing is None and arcz_missing is not None:
arcs_missing = arcz_to_arcs(arcz_missing)
- if arcs_unpredicted is None:
+ if arcs_unpredicted is None and arcz_unpredicted is not None:
arcs_unpredicted = arcz_to_arcs(arcz_unpredicted)
# Start up coverage.py.
diff --git a/tests/helpers.py b/tests/helpers.py
index 1348aad6..a96b793e 100644
--- a/tests/helpers.py
+++ b/tests/helpers.py
@@ -198,7 +198,7 @@ def arcs_to_arcz_repr(arcs):
"""
repr_list = []
- for a, b in arcs:
+ for a, b in (arcs or ()):
line = repr((a, b))
line += " # "
line += _arcs_to_arcz_repr_one(a)