From a4401841ab0f493fc4b0d2ac07198a4e99acbf82 Mon Sep 17 00:00:00 2001 From: David Perez-Suarez Date: Tue, 3 Dec 2024 11:29:54 +0000 Subject: [PATCH 1/2] Adds a nox session for disassemble tests Fixes #532 --- .github/workflows/ci.yml | 7 ++----- noxfile.py | 10 +++++++++- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f62c04a2..4c2efd43 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -109,11 +109,8 @@ jobs: - uses: astral-sh/setup-uv@v4 - - name: Check compute features - run: uv pip install --system .[test,test-extras] - - - name: Test package - run: python -m pytest -ra -m dis --ignore tests/test_notebooks.py + - name: Test compute features + run: uvx nox -s disassemble pass: needs: [pre-commit, check-lite, check-full, discheck] diff --git a/noxfile.py b/noxfile.py index 4024051c..ca43005e 100644 --- a/noxfile.py +++ b/noxfile.py @@ -4,7 +4,7 @@ import nox -nox.options.sessions = ["lint", "lite", "tests", "doctests"] +nox.options.sessions = ["lint", "lite", "tests", "doctests", "disassemble"] nox.needs_version = ">=2024.4.15" nox.options.default_venv_backend = "uv|virtualenv" @@ -88,3 +88,11 @@ def build(session: nox.Session) -> None: """Build an SDist and wheel.""" session.install("build") session.run("python", "-m", "build") + + +@nox.session(reuse_venv=True, python="3.8", default=False) +def disassemble(session: nox.Session) -> None: + """Disassemble run.""" + session.install("-e", ".[test-extras]") + session.posargs.extend(["-ra", "-m", "dis"]) + lite(session) From 356ece5c53b9716a3a9eaf4066fa7667a529a196 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20P=C3=A9rez-Su=C3=A1rez?= Date: Tue, 3 Dec 2024 12:11:25 +0000 Subject: [PATCH 2/2] removes pytest options set by package default and adds verbosity Co-authored-by: Saransh Chopra --- .github/workflows/ci.yml | 2 +- noxfile.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4c2efd43..5a76b8ba 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -110,7 +110,7 @@ jobs: - uses: astral-sh/setup-uv@v4 - name: Test compute features - run: uvx nox -s disassemble + run: uvx nox -s disassemble --verbose pass: needs: [pre-commit, check-lite, check-full, discheck] diff --git a/noxfile.py b/noxfile.py index ca43005e..c3e6b5b1 100644 --- a/noxfile.py +++ b/noxfile.py @@ -94,5 +94,5 @@ def build(session: nox.Session) -> None: def disassemble(session: nox.Session) -> None: """Disassemble run.""" session.install("-e", ".[test-extras]") - session.posargs.extend(["-ra", "-m", "dis"]) + session.posargs.extend(["-m", "dis"]) lite(session)