diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2009-12-26 19:54:58 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2009-12-26 19:54:58 -0500 |
commit | 9befdb656dec3e0370d3288b1c2169d7afec379b (patch) | |
tree | 8cf45ad512498d1d701e293ffcd8e9d1ed04b288 /test/coveragetest.py | |
parent | c3b8f57d2cd96801052fc0d0f56401aaa8d4f063 (diff) | |
download | python-coveragepy-git-9befdb656dec3e0370d3288b1c2169d7afec379b.tar.gz |
Simplify the check_coverage function just a smidgin
Diffstat (limited to 'test/coveragetest.py')
-rw-r--r-- | test/coveragetest.py | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/test/coveragetest.py b/test/coveragetest.py index 01800a57..853db943 100644 --- a/test/coveragetest.py +++ b/test/coveragetest.py @@ -233,17 +233,16 @@ class CoverageTest(TestCase): analysis.statements ) - if missing is not None: - if type(missing) == type(""): - self.assertEqual(analysis.missing_formatted(), missing) + if type(missing) == type(""): + self.assertEqual(analysis.missing_formatted(), missing) + else: + for missing_list in missing: + if analysis.missing_formatted() == missing_list: + break else: - for missing_list in missing: - if analysis.missing_formatted() == missing_list: - break - else: - self.fail("None of the missing choices matched %r" % - analysis.missing_formatted() - ) + self.fail("None of the missing choices matched %r" % + analysis.missing_formatted() + ) if arcs is not None: self.assertEqualArcs(analysis.arc_possibilities(), arcs) |