Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
Now input file must have the /Run/events node in order to check for
the file integrity. We fix the test by adding this table.
  • Loading branch information
gonzaponte committed Nov 6, 2024
1 parent 7cc1130 commit 49efdfb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions invisible_cities/io/pmaps_io_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
from ..evm .pmaps import PMap
from ..evm .pmaps_test import pmaps as pmap_gen
from . import pmaps_io as pmpio
from . import run_and_event_io as reio

from typing import Generator
from typing import Mapping
Expand Down Expand Up @@ -243,6 +244,10 @@ def test_load_pmaps_eager(output_tmpdir, data):
write = pmpio.pmap_writer(output_file)
list(map(write, true_pmaps, event_numbers))

write = reio.run_and_event_writer(output_file)
for event_number in event_numbers:
write(0, event_number, 0)

read_pmaps = pmpio.load_pmaps_eager(pmap_filename)

assert len(read_pmaps) == len(true_pmaps)
Expand Down

0 comments on commit 49efdfb

Please sign in to comment.