Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[repo-helper] Configuration Update #63

Merged
merged 2 commits into from
May 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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