Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci

Signed-off-by: Bernát Gábor <[email protected]>
  • Loading branch information
pre-commit-ci[bot] authored and gaborbernat committed Aug 22, 2023
1 parent 21a67da commit 082bfba
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/tox/pytest.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def _setup_files(dest: Path, base: Path | None, content: dict[str, Any]) -> None
value = f"from __future__ import annotations\n{value}" # noqa: PLW2901
if isinstance(value, dict):
at_path.mkdir(exist_ok=True)
ToxProject._setup_files(at_path, None, value) # noqa: SLF001
ToxProject._setup_files(at_path, None, value)
elif isinstance(value, str):
at_path.write_text(textwrap.dedent(value), encoding="utf-8")
elif value is None:
Expand Down
10 changes: 9 additions & 1 deletion tests/session/test_env_select.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,15 @@ def test_matches_hyphenated_env(env_name: str, tox_project: ToxProjectCreator) -

@pytest.mark.parametrize(
"env_name",
[f"3.{_MINOR}", f"3.{_MINOR}-cov", "3-cov", "3", f"3.{_MINOR}", f"py3{_MINOR}-cov", f"py3.{_MINOR}-cov"],
[
f"3.{_MINOR}",
f"3.{_MINOR}-cov",
"3-cov",
"3",
f"py3.{_MINOR}",
f"py3{_MINOR}-cov",
f"py3.{_MINOR}-cov",
],
)
def test_matches_combined_env(env_name: str, tox_project: ToxProjectCreator) -> None:
tox_ini = """
Expand Down

0 comments on commit 082bfba

Please sign in to comment.