Skip to content

Commit c733b73

Browse files
authored
fixed python3.12 failing CI tests (pybamm-team#4118)
1 parent a427b3a commit c733b73

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

noxfile.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ def run_pybamm_requires(session):
6161
def run_coverage(session):
6262
"""Run the coverage tests and generate an XML report."""
6363
set_environment_variables(PYBAMM_ENV, session=session)
64+
session.install("setuptools", silent=False)
6465
session.install("coverage", silent=False)
6566
session.install("-e", ".[all,dev,jax]", silent=False)
6667
session.run("pytest", "--cov=pybamm", "--cov-report=xml", "tests/unit")
@@ -70,6 +71,7 @@ def run_coverage(session):
7071
def run_integration(session):
7172
"""Run the integration tests."""
7273
set_environment_variables(PYBAMM_ENV, session=session)
74+
session.install("setuptools", silent=False)
7375
session.install("-e", ".[all,dev,jax]", silent=False)
7476
session.run("python", "run-tests.py", "--integration")
7577

@@ -88,6 +90,7 @@ def run_doctests(session):
8890
def run_unit(session):
8991
"""Run the unit tests."""
9092
set_environment_variables(PYBAMM_ENV, session=session)
93+
session.install("setuptools", silent=False)
9194
session.install("-e", ".[all,dev,jax]", silent=False)
9295
session.run("python", "run-tests.py", "--unit")
9396

@@ -96,6 +99,7 @@ def run_unit(session):
9699
def run_examples(session):
97100
"""Run the examples tests for Jupyter notebooks."""
98101
set_environment_variables(PYBAMM_ENV, session=session)
102+
session.install("setuptools", silent=False)
99103
session.install("-e", ".[all,dev]", silent=False)
100104
notebooks_to_test = session.posargs if session.posargs else []
101105
session.run("pytest", "--nbmake", *notebooks_to_test, external=True)
@@ -139,6 +143,7 @@ def set_dev(session):
139143
def run_tests(session):
140144
"""Run the unit tests and integration tests sequentially."""
141145
set_environment_variables(PYBAMM_ENV, session=session)
146+
session.install("setuptools", silent=False)
142147
session.install("-e", ".[all,dev,jax]", silent=False)
143148
session.run("python", "run-tests.py", "--all")
144149

0 commit comments

Comments
 (0)