summaryrefslogtreecommitdiff
path: root/testing/test_unittest.py
diff options
context:
space:
mode:
authorAnthony Sottile <asottile@umich.edu>2020-10-05 18:13:05 -0700
committerAnthony Sottile <asottile@umich.edu>2020-10-05 18:33:17 -0700
commit33d119f71a60d1b41686c04a52c3a570fdcd506c (patch)
tree860431d60652d573998855f45b1ca868700032b1 /testing/test_unittest.py
parent703e89134c2b0c21225014e3a89c17ab062c0ab9 (diff)
downloadpytest-33d119f71a60d1b41686c04a52c3a570fdcd506c.tar.gz
py36+: com2ann
Diffstat (limited to 'testing/test_unittest.py')
-rw-r--r--testing/test_unittest.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/testing/test_unittest.py b/testing/test_unittest.py
index 1aa885264..f6c8c48ed 100644
--- a/testing/test_unittest.py
+++ b/testing/test_unittest.py
@@ -1162,7 +1162,7 @@ def test_pdb_teardown_called(testdir, monkeypatch) -> None:
We delay the normal tearDown() calls when --pdb is given, so this ensures we are calling
tearDown() eventually to avoid memory leaks when using --pdb.
"""
- teardowns = [] # type: List[str]
+ teardowns: List[str] = []
monkeypatch.setattr(
pytest, "test_pdb_teardown_called_teardowns", teardowns, raising=False
)
@@ -1194,7 +1194,7 @@ def test_pdb_teardown_called(testdir, monkeypatch) -> None:
@pytest.mark.parametrize("mark", ["@unittest.skip", "@pytest.mark.skip"])
def test_pdb_teardown_skipped(testdir, monkeypatch, mark: str) -> None:
"""With --pdb, setUp and tearDown should not be called for skipped tests."""
- tracked = [] # type: List[str]
+ tracked: List[str] = []
monkeypatch.setattr(pytest, "test_pdb_teardown_skipped", tracked, raising=False)
testdir.makepyfile(