Skip to content

Commit

Permalink
Rewrite test_sophronia_keeps_hitless_events
Browse files Browse the repository at this point in the history
  • Loading branch information
gonzaponte committed Oct 30, 2024
1 parent 026951a commit f8044f3
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions invisible_cities/cities/sophronia_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,11 @@ def test_sophronia_filters_events_with_only_nn_hits(config_tmpdir, sophronia_con

def test_sophronia_keeps_hitless_events(config_tmpdir, sophronia_config):
"""
Run with a high q threshold so all hits are discarded (turned into NN).
Check that these events are still in the /Run/events output, but not in
the /RECO/events output.
Run with a high q threshold so all hits are discarded (turned into
NN). Check that these events are still in the /Run/events output,
but not in the /RECO/events output. In this case, because the only
event processed is not stored, the table and group are not
created, so we checked that.
"""
path_out = os.path.join(config_tmpdir, 'test_sophronia_keeps_hitless_events.h5')
config = dict(**sophronia_config)
Expand All @@ -130,5 +132,4 @@ def test_sophronia_keeps_hitless_events(config_tmpdir, sophronia_config):

with tb.open_file(path_out) as output_file:
assert len(output_file.root.Run.events) == 1
assert event_number == output_file.root.Run.events[0][0]
assert event_number not in output_file.root.RECO.Events.col("event")
assert "RECO" not in output_file.root

0 comments on commit f8044f3

Please sign in to comment.