Skip to content

Commit

Permalink
Drop unittest2 support
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
nicoddemus committed Jul 5, 2019
1 parent 60a358f commit 64965ba
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/_pytest/nose.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

def get_skip_exceptions():
skip_classes = set()
for module_name in ("unittest", "unittest2", "nose"):
for module_name in ("unittest", "nose"):
mod = sys.modules.get(module_name)
if hasattr(mod, "SkipTest"):
skip_classes.add(mod.SkipTest)
Expand Down
4 changes: 1 addition & 3 deletions testing/test_unittest.py
Original file line number Diff line number Diff line change
Expand Up @@ -939,9 +939,7 @@ def test_should_not_run(self):
reprec.assertoutcome(passed=1)


@pytest.mark.parametrize(
"base", ["builtins.object", "unittest.TestCase", "unittest2.TestCase"]
)
@pytest.mark.parametrize("base", ["builtins.object", "unittest.TestCase"])
def test_usefixtures_marker_on_unittest(base, testdir):
"""#3498"""
module = base.rsplit(".", 1)[0]
Expand Down
1 change: 0 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ deps =
pexpect: pexpect
pluggymaster: git+https://github.com/pytest-dev/pluggy.git@master
twisted: twisted
twisted: unittest2
xdist: pytest-xdist>=1.13
{env:_PYTEST_TOX_EXTRA_DEP:}
platform = {env:_PYTEST_TOX_PLATFORM:.*}
Expand Down

0 comments on commit 64965ba

Please sign in to comment.