gapic-generator-python
gapic-generator-python copied to clipboard
[logging] Construct and run nox sessions with logging
In #2281, we're running presubmits with logging by setting the environment variable GOOGLE_SDK_PYTHON_LOGGING_SCOPE within the GitHub action and then running the usual nox unit tests. This works, but it means that when running locally to test for logging, we have to do the same thing. It would be easier to be able to do this via nox sessions.
In addition, logging is an inherent part of the generator and the GAPICs, so this shouldn't be external to the testing framework.
We can specify environment variables in nox via https://nox.thea.codes/en/stable/config.html#nox.sessions.Session.env