InteractiveMap tests and guidance request for GRASS GSoC

Hi everyone,

I’m interested in applying for the “Improve GRASS user experience in Jupyter Notebook” GSoC idea. I’ve been exploring the grass.jupyter codebase, specifically the InteractiveMap class, and tried writing some initial tests to validate object creation and adding layers.

When running the tests, they failed with:

OSError: Cannot find the executable g.region

I understand this happens because InteractiveMap internally calls GRASS binaries (g.region, r.proj) which require a live GRASS session and location. I wanted to confirm: should I continue by setting up integration-style tests with a full GRASS session, or should I start with mocked unit tests to isolate the Python logic?

My goal is to improve the user experience for working with GRASS inside Jupyter notebooks, and I want to make sure my approach aligns with the project direction. Any guidance would be greatly appreciated!

Thanks!

We have 2 types of tests, using pytest and python unittests. Pytest is preferred for new tests. See the existing pytests to see how to create fixtures that setup the GRASS session. See also grass/testsuite at main · OSGeo/grass · GitHub