Raise clear ValueError for truncated/malformed nep.txt parameter counts

Fixes a follow-up bug found via fuzz testing after !243 (merged): read_model correctly converts header-validation errors to ValueError/OSError, but a nep.txt with a well-formed header and a truncated or corrupted parameter section still fell through to the internal-invariant assert at the end of the function, raising a confusing AssertionError with a "please submit a bug report" message for what is actually malformed input, not a calorine bug.

This MR replaces that assert with two explicit ValueErrors that distinguish too few parameter lines (truncated file) from too many (extra or corrupted data), and adds regression tests for both cases.

No public API changes; only the exception type/message for this specific malformed-input case changes, from AssertionError to ValueError.

Merge request reports

Loading