tests: fully type the test suite (#2794)
* tests: fully type the test suite * chore: require more typing Signed-off-by: Henry Schreiner <henryfs@princeton.edu> * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Signed-off-by: Henry Schreiner <henryfs@princeton.edu> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
parent
643b30c796
commit
097806b6b1
@@ -2,6 +2,7 @@ import os
|
||||
import subprocess
|
||||
import sys
|
||||
import textwrap
|
||||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
|
||||
@@ -33,7 +34,7 @@ project_with_environment_asserts = test_projects.new_c_project(
|
||||
)
|
||||
|
||||
|
||||
def test(tmp_path):
|
||||
def test(tmp_path: Path) -> None:
|
||||
python_echo = f"'{sys.executable}' -c \"import sys; print(*sys.argv[1:])\""
|
||||
project_dir = tmp_path / "project"
|
||||
project_with_environment_asserts.generate(project_dir)
|
||||
@@ -55,7 +56,7 @@ def test(tmp_path):
|
||||
assert set(actual_wheels) == set(expected_wheels)
|
||||
|
||||
|
||||
def test_overridden_path(tmp_path, capfd):
|
||||
def test_overridden_path(tmp_path: Path, capfd: pytest.CaptureFixture[str]) -> None:
|
||||
project_dir = tmp_path / "project"
|
||||
output_dir = tmp_path / "output"
|
||||
|
||||
@@ -108,7 +109,7 @@ def test_overridden_path(tmp_path, capfd):
|
||||
),
|
||||
],
|
||||
)
|
||||
def test_overridden_pip_constraint(tmp_path, build_frontend):
|
||||
def test_overridden_pip_constraint(tmp_path: Path, build_frontend: str) -> None:
|
||||
"""
|
||||
Verify that users can use PIP_CONSTRAINT to specify a specific version of
|
||||
a build-system.requires dependency, by asserting the version of pytz in the
|
||||
|
||||
Reference in New Issue
Block a user