Skip to content
Snippets Groups Projects
Commit 9bfd88f9 authored by Frederik Hennig's avatar Frederik Hennig
Browse files

omit coverage check in CPU testsuite

parent 6ea1c7b1
Branches
1 merge request!172Draft: Changes for compatibility with pystencils 2.0
Pipeline #77933 failed with stages
in 16 minutes and 16 seconds
......@@ -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)
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment