|
1 | | -# mypy: allow-untyped-defs |
2 | 1 | import os |
3 | 2 | from pathlib import Path |
4 | 3 | import shutil |
| 4 | +from typing import Any |
5 | 5 | from typing import Generator |
6 | 6 | from typing import List |
| 7 | +from typing import Sequence |
| 8 | +from typing import Tuple |
7 | 9 |
|
8 | 10 | from _pytest.config import ExitCode |
9 | 11 | from _pytest.monkeypatch import MonkeyPatch |
@@ -175,7 +177,9 @@ def test_custom_cache_dir_with_env_var( |
175 | 177 |
|
176 | 178 |
|
177 | 179 | @pytest.mark.parametrize("env", ((), ("TOX_ENV_DIR", "/tox_env_dir"))) |
178 | | -def test_cache_reportheader(env, pytester: Pytester, monkeypatch: MonkeyPatch) -> None: |
| 180 | +def test_cache_reportheader( |
| 181 | + env: Sequence[str], pytester: Pytester, monkeypatch: MonkeyPatch |
| 182 | +) -> None: |
179 | 183 | pytester.makepyfile("""def test_foo(): pass""") |
180 | 184 | if env: |
181 | 185 | monkeypatch.setenv(*env) |
@@ -507,7 +511,7 @@ def test_hello(): |
507 | 511 | """ |
508 | 512 | ) |
509 | 513 |
|
510 | | - def rlf(fail_import, fail_run): |
| 514 | + def rlf(fail_import: int, fail_run: int) -> Any: |
511 | 515 | monkeypatch.setenv("FAILIMPORT", str(fail_import)) |
512 | 516 | monkeypatch.setenv("FAILTEST", str(fail_run)) |
513 | 517 |
|
@@ -555,7 +559,9 @@ def test_pass(): |
555 | 559 | """ |
556 | 560 | ) |
557 | 561 |
|
558 | | - def rlf(fail_import, fail_run, args=()): |
| 562 | + def rlf( |
| 563 | + fail_import: int, fail_run: int, args: Sequence[str] = () |
| 564 | + ) -> Tuple[Any, Any]: |
559 | 565 | monkeypatch.setenv("FAILIMPORT", str(fail_import)) |
560 | 566 | monkeypatch.setenv("FAILTEST", str(fail_run)) |
561 | 567 |
|
|
0 commit comments