diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2022-12-08 07:07:16 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2022-12-08 07:40:23 -0500 |
commit | 71050957c68a7e1eaece7134be256535173e9b85 (patch) | |
tree | d1a3ddf4878599479f51a5d9af5058e5aa059e5d /tests | |
parent | 4bca0478723434ab16582f94840cb38fa6878cd8 (diff) | |
download | python-coveragepy-git-nedbat/picklable.tar.gz |
refactor: don't hold data so that Analysis can be picklednedbat/picklable
Diffstat (limited to 'tests')
-rw-r--r-- | tests/coveragetest.py | 8 | ||||
-rw-r--r-- | tests/test_plugins.py | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/tests/coveragetest.py b/tests/coveragetest.py index 56e78853..cc5f26f0 100644 --- a/tests/coveragetest.py +++ b/tests/coveragetest.py @@ -199,12 +199,12 @@ class CoverageTest( if arcs is not None: # print("Possible arcs:") # print(" expected:", arcs) - # print(" actual:", analysis.arc_possibilities()) + # print(" actual:", analysis.arc_possibilities) # print("Executed:") - # print(" actual:", sorted(set(analysis.arcs_executed()))) + # print(" actual:", sorted(set(analysis.arcs_executed))) # TODO: this would be nicer with pytest-check, once we can run that. msg = ( - self._check_arcs(arcs, analysis.arc_possibilities(), "Possible") + + self._check_arcs(arcs, analysis.arc_possibilities, "Possible") + self._check_arcs(arcs_missing, analysis.arcs_missing(), "Missing") + self._check_arcs(arcs_unpredicted, analysis.arcs_unpredicted(), "Unpredicted") ) @@ -465,7 +465,7 @@ class CoverageTest( # ugh, unexposed methods?? filename = self.last_module_name + ".py" fr = cov._get_file_reporter(filename) - arcs_executed = cov._analyze(filename).arcs_executed() + arcs_executed = cov._analyze(filename).arcs_executed return fr.missing_arc_description(start, end, arcs_executed) diff --git a/tests/test_plugins.py b/tests/test_plugins.py index cd446441..a01904b2 100644 --- a/tests/test_plugins.py +++ b/tests/test_plugins.py @@ -395,8 +395,8 @@ class GoodFileTracerTest(FileTracerTest): analysis = cov._analyze("foo_7.html") assert analysis.statements == {1, 2, 3, 4, 5, 6, 7} # Plugins don't do branch coverage yet. - assert analysis.has_arcs() is True - assert analysis.arc_possibilities() == [] + assert analysis.has_arcs is True + assert analysis.arc_possibilities == [] assert analysis.missing == {1, 2, 3, 6, 7} |