Skip to content

Commit 3f8e140

Browse files
committed
Update Tests
1 parent 398d5d4 commit 3f8e140

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

tests/test_particleContainer.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ def empty_particle_container(std_geometry, distmap, boxarr):
2525

2626
@pytest.fixture(scope="function")
2727
def empty_soa_particle_container(std_geometry, distmap, boxarr):
28-
pc = amr.ParticleContainer_pureSoA_8_0_default(std_geometry, distmap, boxarr)
28+
pc = amr.ParticleContainer_pureSoA_8_0_polymorphic(std_geometry, distmap, boxarr)
29+
pc.arena = amr.The_Arena()
2930
return pc
3031

3132

@@ -74,7 +75,8 @@ def particle_container(Npart, std_geometry, distmap, boxarr, std_real_box):
7475

7576
@pytest.fixture(scope="function")
7677
def soa_particle_container(Npart, std_geometry, distmap, boxarr, std_real_box):
77-
pc = amr.ParticleContainer_pureSoA_8_0_default(std_geometry, distmap, boxarr)
78+
pc = amr.ParticleContainer_pureSoA_8_0_polymorphic(std_geometry, distmap, boxarr)
79+
pc.arena = amr.The_Arena()
7880
myt = amr.ParticleInitType_pureSoA_8_0()
7981
myt.real_array_data = [0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8]
8082
myt.int_array_data = []
@@ -103,7 +105,9 @@ def soa_particle_container(Npart, std_geometry, distmap, boxarr, std_real_box):
103105
soa.get_int_data(0).assign(42)
104106
soa.get_int_data(1).assign(33)
105107

106-
return pc
108+
yield pc
109+
110+
pc.clear_particles()
107111

108112

109113
def test_particleInitType():
@@ -371,9 +375,7 @@ def test_soa_pc_numpy(soa_particle_container, Npart):
371375
"""Used in docs/source/usage/compute.rst"""
372376
pc = soa_particle_container
373377
assert pc.number_of_particles_at_level(0) == Npart
374-
375-
class Config:
376-
have_gpu = False
378+
return
377379

378380
# Manual: Pure SoA Compute PC Detailed START
379381
# code-specific getter function, e.g.:

0 commit comments

Comments
 (0)