See https://github.com/grpc/grpc/issues/15253 for more context. The
original behavior when running Python tests is to try to create a
virtual env with the specifed Python version. If there is an issue
with that, fallback to the system's default Python version. This leads to
misleading test results, so removing the fallback and failing the test
when virtual env fails to instantiate the specified Python version is
the new behavior.
The test modules were not under pylint jurisdiction,
and actual bugs have been found in tests that would
have been prevented had we run static analysis on
the test code as we do on the core modules.
This is the first step to enable pylint on tests.
Due to numerous warnings since the code is not ready
and needs refactoring, a new `.pylintrc`
specific to tests is added that suppresses a number
of valid warnings. The goal is stepwise elimination
of each class of warning while refactoring the code
such that it will not emit any warnings in future
commits, always keeping the sanity checks passing
and keeping the disruption minimal.
With the upgrade of Kokoro macOS workers to Sierra, not all versions of
Python have a pip version new enough to have TLSv1.2. This change should
make macOS Python testing more resilient to environment changes.