Skip to content

Commit

Permalink
[repo-helper] Configuration Update (#63)
Browse files Browse the repository at this point in the history
* Updated files with 'repo_helper'.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

Co-authored-by: repo-helper[bot] <74742576+repo-helper[bot]@users.noreply.github.com>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
repo-helper[bot] and pre-commit-ci[bot] committed May 18, 2022
1 parent fbdac9c commit 74bcd24
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Expand Up @@ -40,7 +40,7 @@ repos:
- id: bind-requirements

- repo: https://github.com/domdfcoding/flake8-dunder-all
rev: v0.2.0
rev: v0.2.1
hooks:
- id: ensure-dunder-all
files: ^whey/.*\.py$
Expand Down
42 changes: 30 additions & 12 deletions tests/test_cli.py
Expand Up @@ -369,55 +369,73 @@ def test_build_additional_files(
[
pytest.param(
'[project]\nname = "spam"',
textwrap.dedent("""\
textwrap.dedent(
"""\
BadConfigError: The 'project.version' field must be provided.
Use '--traceback' to view the full traceback.
Aborted!"""),
Aborted!"""
),
id="no_version"
),
pytest.param(
'[project]\n\nversion = "2020.0.0"',
textwrap.dedent("""\
textwrap.dedent(
"""\
BadConfigError: The 'project.name' field must be provided.
Use '--traceback' to view the full traceback.
Aborted!"""),
Aborted!"""
),
id="no_name"
),
pytest.param(
'[project]\ndynamic = ["name"]',
textwrap.dedent("""\
textwrap.dedent(
"""\
BadConfigError: The 'project.name' field may not be dynamic.
Use '--traceback' to view the full traceback.
Aborted!"""),
Aborted!"""
),
id="dynamic_name"
),
pytest.param(
'[project]\nname = "???????12345=============☃"\nversion = "2020.0.0"',
re.escape(textwrap.dedent("""\
re.escape(
textwrap.dedent(
"""\
BadConfigError: The value '???????12345=============☃' for 'project.name' is invalid.
Documentation: https://whey.readthedocs.io/en/latest/configuration.html#tconf-project.name
Use '--traceback' to view the full traceback.
Aborted!""")),
Aborted!"""
)
),
id="bad_name"
),
pytest.param(
'[project]\nname = "spam"\nversion = "???????12345=============☃"',
re.escape(textwrap.dedent("""\
re.escape(
textwrap.dedent(
"""\
InvalidVersion: '???????12345=============☃'
Note: versions must follow PEP 440
Documentation: https://peps.python.org/pep-0440/
Use '--traceback' to view the full traceback.
Aborted!""")),
Aborted!"""
)
),
id="bad_version"
),
pytest.param(
f'{MINIMAL_CONFIG}\nrequires-python = "???????12345=============☃"',
re.escape(textwrap.dedent("""\
re.escape(
textwrap.dedent(
"""\
InvalidSpecifier: '???????12345=============☃'
Note: specifiers must follow PEP 508
Documentation: https://peps.python.org/pep-0508/
Use '--traceback' to view the full traceback.
Aborted!""")),
Aborted!"""
)
),
id="bad_requires_python"
),
pytest.param(
Expand Down

0 comments on commit 74bcd24

Please sign in to comment.