diff --git a/CHANGELOG.md b/CHANGELOG.md index ce580a50..887df39c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,10 @@ * Removed Python 3.10 and 3.11 support * Removed `setuptools-scm` from the build-system requirements: Files committed into the generated project's repository are no longer automatically included in releases [#713](https://github.com/NLeSC/python-template/pull/713) +### Fixed + +* `tox` in a generated package now runs the tests: its table was misspelled `tool.box.testenv` [#716](https://github.com/NLeSC/python-template/pull/716) + ## [0.6.1] ### Added diff --git a/template/pyproject.toml.jinja b/template/pyproject.toml.jinja index 2b5d3c09..7c19c0bc 100644 --- a/template/pyproject.toml.jinja +++ b/template/pyproject.toml.jinja @@ -111,10 +111,9 @@ requires = ["tox>=4.22"] env_list = [ "py312", "py313", "py314" ] skip_missing_interpreters = true {% if AddLocalTests -%} -[tool.box.testenv] +[tool.tox.env_run_base] description = "Run test under {base_python}" commands = [["pytest"]] -[tool.tox.env_run_base] dependency_groups = [ "dev" ] {%- endif %} diff --git a/tests/test_project.py b/tests/test_project.py index c70e7174..96e804e0 100644 --- a/tests/test_project.py +++ b/tests/test_project.py @@ -90,6 +90,7 @@ def test_tox(baked_with_development_dependencies, project_env_bin_dir): result = run([f'{bin_dir}tox'], project_dir) assert result.returncode == 0 assert 'congratulations :)' in result.stdout + assert '== 3 passed in' in result.stdout # assert (project_dir / '.tox' / 'dist' / 'my_python_package-0.1.0.zip').exists() assert (project_dir / '.tox' / '.pkg' / 'dist'/ 'my_python_package-0.1.0.tar.gz').exists()