summaryrefslogtreecommitdiff
path: root/tests/test_coverage.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2015-02-07 10:53:13 -0500
committerNed Batchelder <ned@nedbatchelder.com>2015-02-07 10:53:13 -0500
commit7d95e303613cfbbc9067f4813c641c61aa251dc8 (patch)
tree7e2154fb47a6f0529f8edbe1a63d0ecee157778e /tests/test_coverage.py
parent488981cbf86c58ec4aadcfe6b151eb50b7bf7fdf (diff)
downloadpython-coveragepy-git-7d95e303613cfbbc9067f4813c641c61aa251dc8.tar.gz
Fully embrace SkipTest with our own method.
Also, no test is conditionally defined. They call self.skip if they should be skippped.
Diffstat (limited to 'tests/test_coverage.py')
-rw-r--r--tests/test_coverage.py28
1 files changed, 15 insertions, 13 deletions
diff --git a/tests/test_coverage.py b/tests/test_coverage.py
index 21f9154f..35c7c25c 100644
--- a/tests/test_coverage.py
+++ b/tests/test_coverage.py
@@ -306,19 +306,21 @@ class SimpleStatementTest(CoverageTest):
""",
[1,2,3,6,9], "")
- if env.PY2: # Print statement is gone in Py3k.
- def test_print(self):
- self.check_coverage("""\
- print "hello, world!"
- print ("hey: %d" %
- 17)
- print "goodbye"
- print "hello, world!",
- print ("hey: %d" %
- 17),
- print "goodbye",
- """,
- [1,2,4,5,6,8], "")
+ def test_print(self):
+ if env.PY3: # Print statement is gone in Py3k.
+ self.skip("No more print statement in Python 3.")
+
+ self.check_coverage("""\
+ print "hello, world!"
+ print ("hey: %d" %
+ 17)
+ print "goodbye"
+ print "hello, world!",
+ print ("hey: %d" %
+ 17),
+ print "goodbye",
+ """,
+ [1,2,4,5,6,8], "")
def test_raise(self):
self.check_coverage("""\