diff --git a/noxfile.py b/noxfile.py index 16dbc36e9f68df41547430cac6f9f0ea47aff599..cda25f9d867ff9c5a949e687590afc91dd546a89 100644 --- a/noxfile.py +++ b/noxfile.py @@ -95,31 +95,37 @@ def typecheck(session: nox.Session): session.run("mypy", "src/lbmpy") -def run_testsuite(session: nox.Session): +def run_testsuite(session: nox.Session, coverage: bool = True): num_cores = os.cpu_count() - session.run( + args = [ "pytest", "-v", "-n", str(num_cores), - "--cov-report=term", - "--cov=.", "-m", "not longrun", "--html", "test-report/index.html", "--junitxml=report.xml", - ) + ] + + if coverage: + args += [ + "--cov-report=term", + "--cov=.", + ] + + session.run(*args) session.run("coverage", "html") session.run("coverage", "xml") - + @nox.session(python=["3.10", "3.11", "3.12", "3.13"]) def testsuite_cpu(session: nox.Session): install_pystencils_master(session) editable_install(session, ["alltrafos", "use_cython", "interactive", "tests"]) - run_testsuite(session) + run_testsuite(session, coverage=False) @nox.session(python=["3.10", "3.11", "3.12", "3.13"]) @@ -137,7 +143,9 @@ def testsuite_pystencils2(session: nox.Session, cupy_version: str | None): if cupy_version is not None: install_cupy(session, cupy_version, skip_if_no_cuda=True) - session.install("git+https://i10git.cs.fau.de/pycodegen/pystencils.git@v2.0-dev") + session.install( + "git+https://i10git.cs.fau.de/pycodegen/pystencils.git@fhennig/patches-for-lbmpy" + ) editable_install(session, ["alltrafos", "use_cython", "interactive", "tests"]) run_testsuite(session) @@ -146,7 +154,9 @@ def testsuite_pystencils2(session: nox.Session, cupy_version: str | None): @nox.session def quicktest(session: nox.Session): parser = ArgumentParser() - parser.add_argument("--sympy-master", action="store_true", help="Use latest SymPy master revision") + parser.add_argument( + "--sympy-master", action="store_true", help="Use latest SymPy master revision" + ) args = parser.parse_args(session.posargs) install_pystencils_master(session)