diff --git a/python/tests/test_swig_interface.py b/python/tests/test_swig_interface.py index 41845c9d37..ffec95b77b 100644 --- a/python/tests/test_swig_interface.py +++ b/python/tests/test_swig_interface.py @@ -509,7 +509,6 @@ def test_rdataview(sbml_example_presimulation_module): model_module = sbml_example_presimulation_module model = model_module.getModel() rdata = amici.runAmiciSimulation(model, model.getSolver()) - assert isinstance(rdata, amici.ReturnDataView) # fields are accessible via dot notation and [] operator, @@ -517,6 +516,9 @@ def test_rdataview(sbml_example_presimulation_module): with pytest.raises(AttributeError): _ = rdata.nonexisting_attribute + with pytest.raises(KeyError): + _ = rdata["nonexisting_attribute"] + assert not hasattr(rdata, "nonexisting_attribute") assert "x" in rdata assert rdata.x == rdata["x"]