@@ -26,7 +26,7 @@ import nox
2626BLACK_VERSION = "black==19.10b0"
2727BLACK_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"]
2828
29- DEFAULT_PYTHON_VERSION="{{ default_python_version }}"
29+ DEFAULT_PYTHON_VERSION="{{ default_python_version }}"
3030SYSTEM_TEST_PYTHON_VERSIONS=[{% for v in system_test_python_versions %} "{{v}}"{% if not loop .last %} ,{% endif %}{% endfor %} ]
3131UNIT_TEST_PYTHON_VERSIONS=[{% for v in unit_test_python_versions %} "{{v}}"{% if not loop .last %} ,{% endif %}{% endfor %} ]
3232
@@ -106,6 +106,10 @@ def system(session):
106106 """Run the system test suite."""
107107 system_test_path = os.path.join("tests", "system.py")
108108 system_test_folder_path = os.path.join("tests", "system")
109+
110+ # Check the value of `RUN_SYSTEM_TESTS` env var. It defaults to true.
111+ if os.environ.get("RUN_SYSTEM_TESTS", "true") == 'false':
112+ session.skip("RUN_SYSTEM_TESTS is set to false, skipping")
109113 # Sanity check: Only run tests if the environment variable is set.
110114 if not os.environ.get("GOOGLE_APPLICATION_CREDENTIALS", ""):
111115 session.skip("Credentials must be set via environment variable")
@@ -122,7 +126,7 @@ def system(session):
122126 # Install all test dependencies, then install this package into the
123127 # virtualenv's dist-packages.
124128 session.install("mock", "pytest", "google-cloud-testutils", {% for d in system_test_external_dependencies %} "{{d}}"{% if not loop .last %} ,{% endif %}{% endfor %} )
125-
129+
126130 {% - if system_test_local_dependencies %}
127131 session.install("-e", {% for d in system_test_local_dependencies %} "{{d}}"{% if not loop .last %} ,{% endif %}{% endfor %} )
128132 {% - endif %}
0 commit comments