-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy pathnoxfile.py
More file actions
27 lines (18 loc) · 794 Bytes
/
Copy pathnoxfile.py
File metadata and controls
27 lines (18 loc) · 794 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
"""Nox sessions for cellpy.
Installs the project and its extras/dev group from ``pyproject.toml``
"""
import nox
PYTHON_VERSIONS = ["3.13", "3.14"]
def _install_project(session: nox.Session) -> None:
"""Editable install with optional extras + ``[dependency-groups].dev``."""
session.install("-e", ".[all]", "--group", "dev")
@nox.session(python=PYTHON_VERSIONS)
def tests(session: nox.Session) -> None:
"""Run the test suite in a virtualenv."""
_install_project(session)
session.run("pytest", *session.posargs)
@nox.session(python=PYTHON_VERSIONS, venv_backend="conda")
def conda_tests(session: nox.Session) -> None:
"""Run the test suite in a conda-backed env (same pyproject deps)."""
_install_project(session)
session.run("pytest", *session.posargs)