summaryrefslogtreecommitdiff
path: root/tests/test_api.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-07 17:24:44 -0500
commitc0921466d3d235f10be333da1f9cf523f4e2e24c (patch)
tree5e67f7e62db1048229a54e308885b935616b6e5a /tests/test_api.py
parent465dace54a3f3300c0a86b527a8f77d0475fc895 (diff)
downloadpython-coveragepy-git-c0921466d3d235f10be333da1f9cf523f4e2e24c.tar.gz
refactor: convert all skipping to pytest skips
Diffstat (limited to 'tests/test_api.py')
-rw-r--r--tests/test_api.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/tests/test_api.py b/tests/test_api.py
index 0c1c9035..66f471c3 100644
--- a/tests/test_api.py
+++ b/tests/test_api.py
@@ -763,14 +763,12 @@ class CurrentInstanceTest(CoverageTest):
assert cur0 is cur3
+@pytest.mark.skip(not env.PYBEHAVIOR.namespaces_pep420,
+ reason="Python before 3.3 doesn't have namespace packages"
+)
class NamespaceModuleTest(UsingModulesMixin, CoverageTest):
"""Test PEP-420 namespace modules."""
- def setUp(self):
- if not env.PYBEHAVIOR.namespaces_pep420:
- self.skipTest("Python before 3.3 doesn't have namespace packages")
- super(NamespaceModuleTest, self).setUp()
-
def test_explicit_namespace_module(self):
self.make_file("main.py", "import namespace_420\n")