summaryrefslogtreecommitdiff
path: root/tests/test_arcs.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2021-02-06 21:55:29 -0500
committerNed Batchelder <ned@nedbatchelder.com>2021-02-06 21:57:26 -0500
commit2af7e87b26754fea68adfd1b8aa51052d987e60c (patch)
tree3d81d1e79bebd529240629b9cd43c4f0e273046b /tests/test_arcs.py
parente59da1bafafe4265188bb5c75c4e557dfbd47d90 (diff)
downloadpython-coveragepy-git-nedbat/better-combine-action.tar.gz
refactor: convert all skipping to pytest skipsnedbat/better-combine-action
Diffstat (limited to 'tests/test_arcs.py')
-rw-r--r--tests/test_arcs.py16
1 files changed, 7 insertions, 9 deletions
diff --git a/tests/test_arcs.py b/tests/test_arcs.py
index c6cf7952..83e9e6b1 100644
--- a/tests/test_arcs.py
+++ b/tests/test_arcs.py
@@ -1085,9 +1085,10 @@ class YieldTest(CoverageTest):
)
assert self.stdout() == "20\n12\n"
+ @pytest.mark.skipif(not env.PYBEHAVIOR.yield_from,
+ reason="Python before 3.3 doesn't have 'yield from'"
+ )
def test_yield_from(self):
- if not env.PYBEHAVIOR.yield_from:
- self.skipTest("Python before 3.3 doesn't have 'yield from'")
self.check_coverage("""\
def gen(inp):
i = 2
@@ -1332,9 +1333,10 @@ class MiscArcTest(CoverageTest):
arcz=".1 19 9.",
)
+ @pytest.mark.skipif(not env.PYBEHAVIOR.unpackings_pep448,
+ reason="Don't have unpacked literals until 3.5"
+ )
def test_unpacked_literals(self):
- if not env.PYBEHAVIOR.unpackings_pep448:
- self.skipTest("Don't have unpacked literals until 3.5")
self.check_coverage("""\
d = {
'a': 2,
@@ -1581,14 +1583,10 @@ class LambdaArcTest(CoverageTest):
)
+@pytest.mark.skipif(not env.PYBEHAVIOR.async_syntax, reason="Async features are new in Python 3.5")
class AsyncTest(CoverageTest):
"""Tests of the new async and await keywords in Python 3.5"""
- def setUp(self):
- if not env.PYBEHAVIOR.async_syntax:
- self.skipTest("Async features are new in Python 3.5")
- super(AsyncTest, self).setUp()
-
def test_async(self):
self.check_coverage("""\
import asyncio