Skip to content

Commit

Permalink
fix: tweak the hatch integration (#310)
Browse files Browse the repository at this point in the history
Signed-off-by: Henry Schreiner <[email protected]>
  • Loading branch information
henryiii authored Nov 14, 2023
1 parent 4a85cbe commit 745167e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
5 changes: 2 additions & 3 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,11 +243,10 @@ def native(session: nox.Session, backend: str, vcs: bool) -> None:
session.chdir(cookie)

if backend == "hatch":
session.run(backend, "env", "create")
session.run(backend, "run", "test")
else:
session.run(backend, "install")

session.run(backend, "run", "pytest")
session.run(backend, "run", "pytest")


@nox.session()
Expand Down
9 changes: 5 additions & 4 deletions {{cookiecutter.project_name}}/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -253,10 +253,11 @@ version.path = "src/{{ cookiecutter.__project_slug }}/__init__.py"
version.source = "vcs"
build.hooks.vcs.version-file = "src/{{ cookiecutter.__project_slug }}/_version.py"
{%- endif %}
envs.default.dependencies = [
"pytest",
"pytest-cov",
]

[tool.hatch.env.default]
features = ["test"]
scripts.test = "pytest {args}"


{%- elif cookiecutter.backend == "pdm" %}
{%- if cookiecutter.vcs %}
Expand Down

0 comments on commit 745167e

Please sign in to comment.