Skip to content

Commit

Permalink
Add test for valid config with hyphenated extras.
Browse files Browse the repository at this point in the history
  • Loading branch information
domdfcoding committed May 2, 2022
1 parent 7d5bc16 commit 06ddffb
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from dom_toml.parser import BadConfigError
from domdf_python_tools.paths import PathPlus, in_directory
from pyproject_examples import (
OPTIONAL_DEPENDENCIES,
bad_buildsystem_config,
bad_pep621_config,
valid_buildsystem_config,
Expand All @@ -21,7 +22,13 @@


@pytest.mark.parametrize("set_defaults", [True, False])
@pytest.mark.parametrize("toml_config", valid_pep621_config)
@pytest.mark.parametrize(
"toml_config",
[
*valid_pep621_config,
pytest.param(f"{OPTIONAL_DEPENDENCIES}dev-test = ['black']\n", id="optional-dependencies-hyphen"),
]
)
def test_pep621_class_valid_config(
toml_config: str,
tmp_pathplus: PathPlus,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
dynamic: []
name: spam
optional-dependencies:
dev-test:
- black
test:
- matplotlib>=3.0.0; platform_machine != "aarch64" or python_version > "3.6"
- pytest<5.0.0
- pytest-cov[all]
version: 2020.0.0
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
authors: []
classifiers: []
dependencies: []
description: null
dynamic: []
entry-points: {}
gui-scripts: {}
keywords: []
license: null
maintainers: []
name: spam
optional-dependencies:
dev-test:
- black
test:
- matplotlib>=3.0.0; platform_machine != "aarch64" or python_version > "3.6"
- pytest<5.0.0
- pytest-cov[all]
readme: null
requires-python: null
scripts: {}
urls: {}
version: 2020.0.0

0 comments on commit 06ddffb

Please sign in to comment.