Test: add test for utils.py funcions.#7052
Conversation
|
@petrasovaa, I am not able to change the title of this PR. could you please do that so that it can pass the test and please review this PR. |
|
@petrasovaa, It looks like pytest is failing because these tests require an active GRASS session. Locally they pass when run inside a GRASS session, but in CI, the session does not seem to be initialized. |
|
i believe you should use something like this (see conftest.py under tests): with gs.setup.init(project):
....Basically, gs.setup.init starts the session. Also, to check whether this succeeds or not, I run the pytest in linux terminal (not in the grass terminal). Then note the output of Now run |
I noticed that there is no test for
utils.pyfile ingrass/jupyter/testdirectory.so, In this PR, I add tests for
get_regionandget_location_proj_stringfunction ofutils.pyfile.I verify these test by locally running
pytest