Skip to content

Commit

Permalink
Update test_stat_files to be robust against test ordering
Browse files Browse the repository at this point in the history
  • Loading branch information
apontzen committed May 4, 2024
1 parent f5b4e87 commit 7b78a1c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/test_stat_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ def setup_module():

session.commit()

adder = add_simulation.SimulationAdderUpdater(sim.get_output_handler())
adder.min_halo_particles = 300000
adder.add_objects_to_timestep(ts1)

parallel_tasks.use('null')

def teardown_module():
Expand Down Expand Up @@ -80,10 +84,7 @@ def test_mpi_ahf_values():


def test_insert_halos():
#stat.HaloStatFile(ts1.filename).add_halos(min_NDM=200000)
adder = add_simulation.SimulationAdderUpdater(sim.get_output_handler())
adder.min_halo_particles = 300000
adder.add_objects_to_timestep(ts1)
# insert has already happened in the setup; check that it worked
assert ts1.halos.count()==3
assert ts1.halos[0].NDM==4348608
assert ts1.halos[1].NDM==402567
Expand Down

0 comments on commit 7b78a1c

Please sign in to comment.