-
-
Notifications
You must be signed in to change notification settings - Fork 523
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Bernát Gábor <[email protected]>
- Loading branch information
1 parent
b86729e
commit d6966d4
Showing
6 changed files
with
140 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.0.1 | ||
rev: v4.1.0 | ||
hooks: | ||
- id: check-builtin-literals | ||
- id: check-docstring-first | ||
|
@@ -17,7 +17,7 @@ repos: | |
- id: add-trailing-comma | ||
args: [--py36-plus] | ||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v2.29.1 | ||
rev: v2.30.1 | ||
hooks: | ||
- id: pyupgrade | ||
args: ["--py37-plus"] | ||
|
@@ -43,7 +43,7 @@ repos: | |
- id: prettier | ||
additional_dependencies: | ||
- [email protected] | ||
- "@prettier/plugin-xml@1.1.0" | ||
- "@prettier/plugin-xml@1.2.0" | ||
args: ["--print-width=120", "--prose-wrap=always"] | ||
- repo: https://github.com/asottile/blacken-docs | ||
rev: v1.12.0 | ||
|
@@ -55,7 +55,7 @@ repos: | |
hooks: | ||
- id: setup-cfg-fmt | ||
- repo: https://github.com/tox-dev/tox-ini-fmt | ||
rev: "0.5.1" | ||
rev: "0.5.2" | ||
hooks: | ||
- id: tox-ini-fmt | ||
args: ["-p", "fix"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
from __future__ import annotations | ||
|
||
from tox.pytest import ToxProjectCreator | ||
|
||
|
||
def test_label_core_can_define(tox_project: ToxProjectCreator) -> None: | ||
ini = """ | ||
[tox] | ||
labels = | ||
test = py3{10,9} | ||
static = flake8, type | ||
""" | ||
project = tox_project({"tox.ini": ini}) | ||
outcome = project.run("l", "--no-desc") | ||
outcome.assert_success() | ||
outcome.assert_out_err("py\npy310\npy39\nflake8\ntype\n", "") | ||
|
||
|
||
def test_label_core_select(tox_project: ToxProjectCreator) -> None: | ||
ini = """ | ||
[tox] | ||
labels = | ||
test = py3{10,9} | ||
static = flake8, type | ||
""" | ||
project = tox_project({"tox.ini": ini}) | ||
outcome = project.run("l", "--no-desc", "-m", "test") | ||
outcome.assert_success() | ||
outcome.assert_out_err("py310\npy39\n", "") | ||
|
||
|
||
def test_label_select_trait(tox_project: ToxProjectCreator) -> None: | ||
ini = """ | ||
[tox] | ||
env_list = py310, py39, flake8, type | ||
[testenv] | ||
labels = test | ||
[testenv:flake8] | ||
labels = static | ||
[testenv:type] | ||
labels = static | ||
""" | ||
project = tox_project({"tox.ini": ini}) | ||
outcome = project.run("l", "--no-desc", "-m", "test") | ||
outcome.assert_success() | ||
outcome.assert_out_err("py310\npy39\n", "") | ||
|
||
|
||
def test_label_core_and_trait(tox_project: ToxProjectCreator) -> None: | ||
ini = """ | ||
[tox] | ||
env_list = py310, py39, flake8, type | ||
labels = | ||
static = flake8, type | ||
[testenv] | ||
labels = test | ||
""" | ||
project = tox_project({"tox.ini": ini}) | ||
outcome = project.run("l", "--no-desc", "-m", "test", "static") | ||
outcome.assert_success() | ||
outcome.assert_out_err("py310\npy39\nflake8\ntype\n", "") |