Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
EwoutH committed Oct 3, 2024
1 parent 1b1dedd commit a7dbe0a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/test_solara_viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,11 +100,14 @@ def test_call_space_drawer(mocker): # noqa: D103
"Shape": "circle",
"color": "gray",
}
propertylayer_portrayal = None
# initialize with space drawer unspecified (use default)
# component must be rendered for code to run
solara.render(SolaraViz(model, components=[make_space_matplotlib(agent_portrayal)]))
# should call default method with class instance and agent portrayal
mock_space_matplotlib.assert_called_with(model, agent_portrayal)
mock_space_matplotlib.assert_called_with(
model, agent_portrayal, propertylayer_portrayal
)

# specify no space should be drawn
mock_space_matplotlib.reset_mock()
Expand Down

0 comments on commit a7dbe0a

Please sign in to comment.