JupyterViz: Add tests
See https://github.com/widgetti/solara/tree/master/tests/unit and https://github.com/widgetti/solara/tree/master/tests/integration for inspiration.
The integration test should be easier, because it's basically just running a Solara app and ensures that it doesn't error out. @ankitk50 this should be a low-hanging fruit.
Thanks, I see that there are unittests for each UI element. So the idea would be to create a unittest where we test each element of the JupyterViz. I add this to my To-Do.
@rht Is this issue still open to be fixed or has it been assigned already? I am available to work on building these tests.
Yes it is still open, and a high priority one.
I will take this up for now. I just have one question. /mesa/tests/test_jupyter_viz.py is the file that is to be altered with unit and integration tests for the elements of JupyterViz. Is that right?
Just clarifying before starting to work.
That's right. To disambiguate, this file: https://github.com/projectmesa/mesa/blob/main/tests/test_jupyter_viz.py.
@rht On it.
@rht I've added the Unit Tests on my person forked repo and I'm trying to test them. I'm seeing an issue in /mesa/space.py with the tuple where it is expected an from typing import Tuple . I believe it is some python versioning issue since I'm using Python 3.8.10. I'm not sure if I'm on the right path. What do you reckon I do?
You should upgrade your Python. 3.8 is end of life (see https://endoflife.date/python). If you are on a personal machine, you should upgrade to 3.12.
Understood. Will do so and get back to you. Thank you for the guidance!