From 7a775c29d79ff6bc513172614a83b86194398edf Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Thu, 30 Sep 2021 15:44:41 +0000 Subject: [PATCH] chore: fail samples nox session if python version is missing (#200) --- language/snippets/api/noxfile.py | 4 ++++ language/snippets/classify_text/noxfile.py | 4 ++++ language/snippets/cloud-client/v1/noxfile.py | 4 ++++ language/snippets/generated-samples/v1/noxfile.py | 4 ++++ language/snippets/sentiment/noxfile.py | 4 ++++ 5 files changed, 20 insertions(+) diff --git a/language/snippets/api/noxfile.py b/language/snippets/api/noxfile.py index b008613f03ff..1fd8956fbf01 100644 --- a/language/snippets/api/noxfile.py +++ b/language/snippets/api/noxfile.py @@ -98,6 +98,10 @@ def get_pytest_env_vars() -> Dict[str, str]: "True", "true", ) + +# Error if a python version is missing +nox.options.error_on_missing_interpreters = True + # # Style Checks # diff --git a/language/snippets/classify_text/noxfile.py b/language/snippets/classify_text/noxfile.py index b008613f03ff..1fd8956fbf01 100644 --- a/language/snippets/classify_text/noxfile.py +++ b/language/snippets/classify_text/noxfile.py @@ -98,6 +98,10 @@ def get_pytest_env_vars() -> Dict[str, str]: "True", "true", ) + +# Error if a python version is missing +nox.options.error_on_missing_interpreters = True + # # Style Checks # diff --git a/language/snippets/cloud-client/v1/noxfile.py b/language/snippets/cloud-client/v1/noxfile.py index b008613f03ff..1fd8956fbf01 100644 --- a/language/snippets/cloud-client/v1/noxfile.py +++ b/language/snippets/cloud-client/v1/noxfile.py @@ -98,6 +98,10 @@ def get_pytest_env_vars() -> Dict[str, str]: "True", "true", ) + +# Error if a python version is missing +nox.options.error_on_missing_interpreters = True + # # Style Checks # diff --git a/language/snippets/generated-samples/v1/noxfile.py b/language/snippets/generated-samples/v1/noxfile.py index b008613f03ff..1fd8956fbf01 100644 --- a/language/snippets/generated-samples/v1/noxfile.py +++ b/language/snippets/generated-samples/v1/noxfile.py @@ -98,6 +98,10 @@ def get_pytest_env_vars() -> Dict[str, str]: "True", "true", ) + +# Error if a python version is missing +nox.options.error_on_missing_interpreters = True + # # Style Checks # diff --git a/language/snippets/sentiment/noxfile.py b/language/snippets/sentiment/noxfile.py index b008613f03ff..1fd8956fbf01 100644 --- a/language/snippets/sentiment/noxfile.py +++ b/language/snippets/sentiment/noxfile.py @@ -98,6 +98,10 @@ def get_pytest_env_vars() -> Dict[str, str]: "True", "true", ) + +# Error if a python version is missing +nox.options.error_on_missing_interpreters = True + # # Style Checks #