diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2015-02-07 10:53:13 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2015-02-07 10:53:13 -0500 |
commit | c5144455d0f571c002678d369ec32707c6304e1f (patch) | |
tree | dca4cabafa20065a08d071d93d904a932bb7bbbb /tests/test_coverage.py | |
parent | d6e2d5c1034a7cc0e2bfac251bfe5b4ec8c73036 (diff) | |
download | python-coveragepy-c5144455d0f571c002678d369ec32707c6304e1f.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.py | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/tests/test_coverage.py b/tests/test_coverage.py index 21f9154..35c7c25 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("""\ |