Skip to content

tox in a generated package runs no tests #714

Open

Description

@simonvanlierde

Checklist before submitting an issue

  • I have checked the existing issues and couldn't find an issue about this bug.

Issue details

Hi all,

Running tox in a freshly generated package passes, but it never runs pytest, so it passes even when the tests fail. In template/pyproject.toml.jinja the table is spelled [tool.box.testenv], so tox ignores the description and commands in it. It only installs the package and its dev dependency group, then reports py312: OK.

  • Reproduce: copier copy with the defaults, then tox -e py312 in the new package. The output has no pytest lines at all.
  • test_tox in tests/test_project.py doesn't catch it, because it only checks for "congratulations :)".

The fix is small: move description and commands into the [tool.tox.env_run_base] table right below it, and have test_tox check that pytest ran. I have it ready on a branch. Shall I open a PR?

Best,

Simon

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions