summaryrefslogtreecommitdiff
path: root/testing/test_runner.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_runner.py
parent703e89134c2b0c21225014e3a89c17ab062c0ab9 (diff)
downloadpytest-33d119f71a60d1b41686c04a52c3a570fdcd506c.tar.gz
py36+: com2ann
Diffstat (limited to 'testing/test_runner.py')
-rw-r--r--testing/test_runner.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/testing/test_runner.py b/testing/test_runner.py
index 0101f6823..95b8f5fcc 100644
--- a/testing/test_runner.py
+++ b/testing/test_runner.py
@@ -444,11 +444,11 @@ class TestSessionReports:
assert res[1].name == "TestClass"
-reporttypes = [
+reporttypes: List[Type[reports.BaseReport]] = [
reports.BaseReport,
reports.TestReport,
reports.CollectReport,
-] # type: List[Type[reports.BaseReport]]
+]
@pytest.mark.parametrize(
@@ -456,7 +456,7 @@ reporttypes = [
)
def test_report_extra_parameters(reporttype: Type[reports.BaseReport]) -> None:
args = list(inspect.signature(reporttype.__init__).parameters.keys())[1:]
- basekw = dict.fromkeys(args, []) # type: Dict[str, List[object]]
+ basekw: Dict[str, List[object]] = dict.fromkeys(args, [])
report = reporttype(newthing=1, **basekw)
assert report.newthing == 1
@@ -898,7 +898,7 @@ def test_store_except_info_on_error() -> None:
def test_current_test_env_var(testdir, monkeypatch) -> None:
- pytest_current_test_vars = [] # type: List[Tuple[str, str]]
+ pytest_current_test_vars: List[Tuple[str, str]] = []
monkeypatch.setattr(
sys, "pytest_current_test_vars", pytest_current_test_vars, raising=False
)