Skip to content

Commit 64f7b55

Browse files
committed
removed unreusable reusable code for better readability
1 parent 04f61c3 commit 64f7b55

11 files changed

+990
-917
lines changed

testsuite/pytests/conftest.py

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ def test_gsl():
3131
pass
3232
"""
3333

34-
import dataclasses
3534
import os
3635
import pathlib
3736
import subprocess
@@ -45,7 +44,6 @@ def test_gsl():
4544
# Ignore it during test collection
4645
collect_ignore = ["utilities"]
4746

48-
import testsimulation # noqa
4947
import testutil # noqa
5048

5149

@@ -174,24 +172,3 @@ def skipif_incompatible_mpi(request, subprocess_compatible_mpi):
174172

175173
if not subprocess_compatible_mpi and request.node.get_closest_marker("skipif_incompatible_mpi"):
176174
pytest.skip("skipped because MPI is incompatible with subprocess")
177-
178-
179-
@pytest.fixture(autouse=True)
180-
def simulation_class(request):
181-
return getattr(request, "param", testsimulation.Simulation)
182-
183-
184-
@pytest.fixture
185-
def simulation(request):
186-
marker = request.node.get_closest_marker("simulation")
187-
sim_cls = marker.args[0] if marker else testsimulation.Simulation
188-
sim = sim_cls(*(request.getfixturevalue(field.name) for field in dataclasses.fields(sim_cls)))
189-
nest.ResetKernel()
190-
if getattr(sim, "set_resolution", True):
191-
nest.resolution = sim.resolution
192-
nest.local_num_threads = sim.local_num_threads
193-
return sim
194-
195-
196-
# Inject the root simulation fixtures into this module to be always available.
197-
testutil.create_dataclass_fixtures(testsimulation.Simulation, __name__)

0 commit comments

Comments
 (0)