Skip to content

Commit 1530f8c

Browse files
committed
Add lint:code test for project-template & modify version.py to pass linting
1 parent ab76ffa commit 1530f8c

File tree

4 files changed

+27
-18
lines changed

4 files changed

+27
-18
lines changed

exasol/toolbox/nox/_package_version.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,14 @@
2020

2121
# fmt: off
2222
_VERSION_MODULE_TEMPLATE = cleandoc('''
23-
# ATTENTION:
24-
# This file is generated by exasol/toolbox/nox/_package_version.py when using:
25-
# * either "poetry run -- nox -s project:fix"
26-
# * or "poetry run -- nox version:check -- --fix"
27-
# Do not edit this file manually!
28-
# If you need to change the version, do so in the pyproject.toml, e.g. by using `poetry version X.Y.Z`.
23+
""" ATTENTION:
24+
This file is generated by exasol/toolbox/nox/_package_version.py when using:
25+
* either "poetry run -- nox -s project:fix"
26+
* or "poetry run -- nox version:check -- --fix"
27+
Do not edit this file manually!
28+
If you need to change the version, do so in the pyproject.toml, e.g. by using
29+
`poetry version X.Y.Z`.
30+
"""
2931
MAJOR = {major}
3032
MINOR = {minor}
3133
PATCH = {patch}

exasol/toolbox/version.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1-
# ATTENTION:
2-
# This file is generated by exasol/toolbox/nox/_package_version.py when using:
3-
# * either "poetry run -- nox -s project:fix"
4-
# * or "poetry run -- nox version:check -- --fix"
5-
# Do not edit this file manually!
6-
# If you need to change the version, do so in the pyproject.toml, e.g. by using `poetry version X.Y.Z`.
1+
"""ATTENTION:
2+
This file is generated by exasol/toolbox/nox/_package_version.py when using:
3+
* either "poetry run -- nox -s project:fix"
4+
* or "poetry run -- nox version:check -- --fix"
5+
Do not edit this file manually!
6+
If you need to change the version, do so in the pyproject.toml, e.g. by using
7+
`poetry version X.Y.Z`.
8+
"""
9+
710
MAJOR = 1
811
MINOR = 6
912
PATCH = 0

project-template/{{cookiecutter.repo_name}}/exasol/{{cookiecutter.package_name}}/version.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1-
# ATTENTION:
2-
# This file is generated by exasol/toolbox/nox/_package_version.py when using:
3-
# * either "poetry run -- nox -s project:fix"
4-
# * or "poetry run -- nox -s version:check -- --fix"
5-
# Do not edit this file manually!
6-
# If you need to change the version, do so in the pyproject.toml, e.g. by using `poetry version X.Y.Z`.
1+
"""ATTENTION:
2+
This file is generated by exasol/toolbox/nox/_package_version.py when using:
3+
* either "poetry run -- nox -s project:fix"
4+
* or "poetry run -- nox version:check -- --fix"
5+
Do not edit this file manually!
6+
If you need to change the version, do so in the pyproject.toml, e.g. by using
7+
`poetry version X.Y.Z`.
8+
"""
9+
710
MAJOR = 0
811
MINOR = 1
912
PATCH = 0

test/integration/project-template/nox_test.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,5 @@ def _command(poetry_path: str, task: str) -> list[str]:
88
def test_lint_code(self, poetry_path, run_command):
99
command = self._command(poetry_path, "lint:code")
1010
output = run_command(command, check=False)
11+
assert "Session lint:code was successful." in output.stderr
1112
assert output.returncode == 0

0 commit comments

Comments
 (0)