Skip to content

Commit 64965ba

Browse files
committed
Drop unittest2 support
unittest2 is a backport for Python <=3.2, so we no longer need to support it. I suspect it has not been installed anymore after 5.0 has been released.
1 parent 60a358f commit 64965ba

File tree

3 files changed

+2
-5
lines changed

3 files changed

+2
-5
lines changed

src/_pytest/nose.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010

1111
def get_skip_exceptions():
1212
skip_classes = set()
13-
for module_name in ("unittest", "unittest2", "nose"):
13+
for module_name in ("unittest", "nose"):
1414
mod = sys.modules.get(module_name)
1515
if hasattr(mod, "SkipTest"):
1616
skip_classes.add(mod.SkipTest)

testing/test_unittest.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -939,9 +939,7 @@ def test_should_not_run(self):
939939
reprec.assertoutcome(passed=1)
940940

941941

942-
@pytest.mark.parametrize(
943-
"base", ["builtins.object", "unittest.TestCase", "unittest2.TestCase"]
944-
)
942+
@pytest.mark.parametrize("base", ["builtins.object", "unittest.TestCase"])
945943
def test_usefixtures_marker_on_unittest(base, testdir):
946944
"""#3498"""
947945
module = base.rsplit(".", 1)[0]

tox.ini

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ deps =
4545
pexpect: pexpect
4646
pluggymaster: git+https://github.com/pytest-dev/pluggy.git@master
4747
twisted: twisted
48-
twisted: unittest2
4948
xdist: pytest-xdist>=1.13
5049
{env:_PYTEST_TOX_EXTRA_DEP:}
5150
platform = {env:_PYTEST_TOX_PLATFORM:.*}

0 commit comments

Comments
 (0)