summaryrefslogtreecommitdiff
path: root/tests/test_context.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2021-05-01 13:02:31 -0400
committerNed Batchelder <ned@nedbatchelder.com>2021-05-01 13:30:39 -0400
commit9df434550a499c16e9fd26cfb9627837bfdc02a5 (patch)
tree5619ea3c3bec05d04363a66ced9c7ebffcefb1df /tests/test_context.py
parent3fe17c1f2244c07cf9d0f9e3609392c2ad441db1 (diff)
downloadpython-coveragepy-git-9df434550a499c16e9fd26cfb9627837bfdc02a5.tar.gz
refactor: remove code explicitly choosing between py2 and py3
Diffstat (limited to 'tests/test_context.py')
-rw-r--r--tests/test_context.py15
1 files changed, 0 insertions, 15 deletions
diff --git a/tests/test_context.py b/tests/test_context.py
index f51befae..688d5cce 100644
--- a/tests/test_context.py
+++ b/tests/test_context.py
@@ -6,10 +6,7 @@
import inspect
import os.path
-import pytest
-
import coverage
-from coverage import env
from coverage.context import qualname_from_frame
from coverage.data import CoverageData
@@ -237,13 +234,6 @@ def fake_out(self):
def patch_meth(self):
return get_qualname()
-class OldStyle:
- def meth(self):
- return get_qualname()
-
-class OldChild(OldStyle):
- pass
-
# pylint: enable=missing-class-docstring, missing-function-docstring, unused-argument
@@ -281,11 +271,6 @@ class QualnameTest(CoverageTest):
c.meth = patch_meth
assert c.meth(c) == "tests.test_context.patch_meth"
- @pytest.mark.skipif(not env.PY2, reason="Old-style classes are only in Python 2")
- def test_oldstyle(self):
- assert OldStyle().meth() == "tests.test_context.OldStyle.meth"
- assert OldChild().meth() == "tests.test_context.OldStyle.meth"
-
def test_bug_829(self):
# A class with a name like a function shouldn't confuse qualname_from_frame.
class test_something(object): # pylint: disable=unused-variable