# assert_model

Python reference for `nagasim.modelcheck.assert_model`.

`nagasim.modelcheck.assert_model`

```python
assert_model(path_or_layout, strict: bool = False)
```

Assert, in a test, that a model passes its own assertions, reality and path checks.

Raises ``AssertionError`` naming every failed assertion, so a normal pytest
report shows what went wrong. An inconclusive result (an assertion's
confidence interval straddles the bound) does not raise by default; it is
reported through ``warnings.warn``.

Parameters
----------
path_or_layout : str or dict
    The model file or the layout dict.
strict : bool, default False
    Treat an inconclusive result as a failure too.

Returns
-------
None

See Also
--------
nagasim.api.run_model : Runs the model without checking its assertions.

Examples
--------
>>> from pathlib import Path
>>> import nagasim
>>> from nagasim.modelcheck import assert_model
>>> path = Path(nagasim.__file__).parent / "models" / "single_server.json"
>>> assert_model(str(path)) is None
True
