Closed maxnoe closed 1 year ago
Patch coverage: 93.18%
and project coverage change: -0.27%
:warning:
Comparison is base (
1030e7e
) 96.16% compared to head (f42baa8
) 95.89%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
The changes look fine but it seems you are not testing almost any of the newly added exceptions raised. If I understood correctly, the new test function test_iter_blocks_all tests that with a normal (but empty) file, you get the correct number of blocks, but I am not sure if it would test the iter exists.
Yes, true, will add some tests using arbitrary truncation. The most important one though is the newly added test, which before these fixes here resulted in an infinite loop.
@orelgueta Ok, added some better tests.
Didn't manage to get all error conditions though, but I think it is not really important, they are all basically the same and the effort to create a file where the truncation is on the edge of a super-block inside of one event seems not warranted
Iter blocks didn't have an exit condition...
This only worked because the
CorsikaFile
stops iterating the generator when it sees the RUNE block, but a broken file would have ended up in an infinite loop.