-
-
Notifications
You must be signed in to change notification settings - Fork 307
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
grass.script: Reduce use of env in create_location #3428
grass.script: Reduce use of env in create_location #3428
Conversation
wenzeslaus
commented
Feb 16, 2024
- Reduces use of runtime environment in the create_location function (gisenv call removed).
- Reduces scope of gisrc which simplifies cleanup.
- Adds 4 tests for basic creation of the location (project).
* Reduces use of runtime environment in the create_location function (gisenv call removed). * Reduces scope of gisrc which simplifies cleanup. * Adds 4 tests for basic creation of the location (project).
@echoix Only tangentially related to this PR: You may be interested to know that these tests can't run in parallel and that there are other tests like that. The thing is that the only way to set up the runtime environment with location (project) connection is to change the global process state (environmental variables). However, we are moving the API towards a more robust approach, so the limitation will hopefully disappear. Notably, this is about pytest-based tests. The grass.gunitest tests can be highly parallelized. We can have a deeper discussion on the mailing list or in Discussions if you want. |
You might be interested in monkeypatch of pytest:
|
* Reduces use of runtime environment in the create_location function (gisenv call removed). * Reduces scope of gisrc which simplifies cleanup. * Adds 4 tests for basic creation of the location (project).