diff --git a/.kokoro/python2.7/common.cfg b/.kokoro/python2.7/common.cfg index c80e7bf76174..6e8a0df55e34 100644 --- a/.kokoro/python2.7/common.cfg +++ b/.kokoro/python2.7/common.cfg @@ -41,5 +41,5 @@ action { # Specify which tests to run env_vars: { key: "RUN_TESTS_SESSION" - value: "gae" + value: "py-2.7" } diff --git a/.kokoro/python3.6/common.cfg b/.kokoro/python3.6/common.cfg index bbe0dc539de4..2950ab08e96c 100644 --- a/.kokoro/python3.6/common.cfg +++ b/.kokoro/python3.6/common.cfg @@ -41,5 +41,5 @@ action { # Specify which tests to run env_vars: { key: "RUN_TESTS_SESSION" - value: "py3-3.6" + value: "py-3.6" } diff --git a/.kokoro/python3.7/common.cfg b/.kokoro/python3.7/common.cfg index e870579e10cb..d94fb385ecac 100644 --- a/.kokoro/python3.7/common.cfg +++ b/.kokoro/python3.7/common.cfg @@ -41,5 +41,5 @@ action { # Specify which tests to run env_vars: { key: "RUN_TESTS_SESSION" - value: "py3-3.7" + value: "py-3.7" } diff --git a/.kokoro/python3.8/common.cfg b/.kokoro/python3.8/common.cfg new file mode 100644 index 000000000000..916035f6c4e1 --- /dev/null +++ b/.kokoro/python3.8/common.cfg @@ -0,0 +1,45 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Format: //devtools/kokoro/config/proto/build.proto + +timeout_mins: 300 + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/python-multi" +} + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "python-docs-samples/.kokoro/trampoline.sh" + +# Download secrets from Cloud Storage. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples" + +# Copy results for Resultstore +action { + define_artifacts { + regex: "**/*sponge_log.xml" + } +} + +# Specify which tests to run +env_vars: { + key: "RUN_TESTS_SESSION" + value: "py-3.8" +} diff --git a/.kokoro/python3.8/continuous.cfg b/.kokoro/python3.8/continuous.cfg new file mode 100644 index 000000000000..90879b0bec7e --- /dev/null +++ b/.kokoro/python3.8/continuous.cfg @@ -0,0 +1,21 @@ +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Format: //devtools/kokoro/config/proto/build.proto + +# Tell the trampoline which build file to use. +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/python-docs-samples/.kokoro/tests/run_tests.sh" +} diff --git a/.kokoro/python3.8/periodic.cfg b/.kokoro/python3.8/periodic.cfg new file mode 100644 index 000000000000..90879b0bec7e --- /dev/null +++ b/.kokoro/python3.8/periodic.cfg @@ -0,0 +1,21 @@ +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Format: //devtools/kokoro/config/proto/build.proto + +# Tell the trampoline which build file to use. +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/python-docs-samples/.kokoro/tests/run_tests.sh" +} diff --git a/.kokoro/python3.8/presubmit.cfg b/.kokoro/python3.8/presubmit.cfg new file mode 100644 index 000000000000..e9c6e483b1c7 --- /dev/null +++ b/.kokoro/python3.8/presubmit.cfg @@ -0,0 +1,21 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Format: //devtools/kokoro/config/proto/build.proto + +# Tell the trampoline which build file to use. +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/python-docs-samples/.kokoro/tests/run_tests_only_diff.sh" +} diff --git a/.kokoro/tests/run_tests.sh b/.kokoro/tests/run_tests.sh index baa9270889be..30bdbce6f26f 100755 --- a/.kokoro/tests/run_tests.sh +++ b/.kokoro/tests/run_tests.sh @@ -92,8 +92,13 @@ for file in **/requirements.txt; do # If no local noxfile exists, copy the one from root if [[ ! -f "noxfile.py" ]]; then - cp "$ROOT/noxfile-template.py" "./noxfile.py" - echo -e "\n Using noxfile from project root. \n" + PARENT_DIR=$(cd ../ && pwd) + while [[ "$PARENT_DIR" != "$ROOT" && ! -f "$PARENT_DIR/noxfile-template.py" ]]; + do + PARENT_DIR=$(dirname "$PARENT_DIR") + done + cp "$PARENT_DIR/noxfile-template.py" "./noxfile.py" + echo -e "\n Using noxfile-template from parent folder ($PARENT_DIR). \n" fi # Use nox to execute the tests for the project. diff --git a/appengine/flexible/analytics/requirements-test.txt b/appengine/flexible/analytics/requirements-test.txt new file mode 100644 index 000000000000..605e7026a3a1 --- /dev/null +++ b/appengine/flexible/analytics/requirements-test.txt @@ -0,0 +1,2 @@ +pytest==5.3.2 +responses==0.10.12 diff --git a/appengine/flexible/analytics/requirements.txt b/appengine/flexible/analytics/requirements.txt index da1bcd8111c6..22786067dc34 100644 --- a/appengine/flexible/analytics/requirements.txt +++ b/appengine/flexible/analytics/requirements.txt @@ -1,3 +1,3 @@ Flask==1.1.1 gunicorn==20.0.4 -requests[security]==2.22.0 +requests[security]==2.23.0 diff --git a/appengine/flexible/cloudsql/requirements-test.txt b/appengine/flexible/cloudsql/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/appengine/flexible/cloudsql/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/appengine/flexible/cloudsql_postgresql/requirements-test.txt b/appengine/flexible/cloudsql_postgresql/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/appengine/flexible/cloudsql_postgresql/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/appengine/flexible/datastore/requirements-test.txt b/appengine/flexible/datastore/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/appengine/flexible/datastore/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/appengine/flexible/disk/requirements-test.txt b/appengine/flexible/disk/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/appengine/flexible/disk/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/appengine/flexible/django_cloudsql/requirements-test.txt b/appengine/flexible/django_cloudsql/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/appengine/flexible/django_cloudsql/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/appengine/flexible/extending_runtime/requirements-test.txt b/appengine/flexible/extending_runtime/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/appengine/flexible/extending_runtime/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/appengine/flexible/hello_world/requirements-test.txt b/appengine/flexible/hello_world/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/appengine/flexible/hello_world/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/appengine/flexible/hello_world_django/requirements-test.txt b/appengine/flexible/hello_world_django/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/appengine/flexible/hello_world_django/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/appengine/flexible/mailgun/requirements-test.txt b/appengine/flexible/mailgun/requirements-test.txt new file mode 100644 index 000000000000..605e7026a3a1 --- /dev/null +++ b/appengine/flexible/mailgun/requirements-test.txt @@ -0,0 +1,2 @@ +pytest==5.3.2 +responses==0.10.12 diff --git a/appengine/flexible/mailgun/requirements.txt b/appengine/flexible/mailgun/requirements.txt index da1bcd8111c6..22786067dc34 100644 --- a/appengine/flexible/mailgun/requirements.txt +++ b/appengine/flexible/mailgun/requirements.txt @@ -1,3 +1,3 @@ Flask==1.1.1 gunicorn==20.0.4 -requests[security]==2.22.0 +requests[security]==2.23.0 diff --git a/appengine/flexible/mailjet/requirements-test.txt b/appengine/flexible/mailjet/requirements-test.txt new file mode 100644 index 000000000000..605e7026a3a1 --- /dev/null +++ b/appengine/flexible/mailjet/requirements-test.txt @@ -0,0 +1,2 @@ +pytest==5.3.2 +responses==0.10.12 diff --git a/appengine/flexible/mailjet/requirements.txt b/appengine/flexible/mailjet/requirements.txt index ad0c8e1694bc..29b4596c8cae 100644 --- a/appengine/flexible/mailjet/requirements.txt +++ b/appengine/flexible/mailjet/requirements.txt @@ -1,4 +1,4 @@ Flask==1.1.1 gunicorn==20.0.4 -requests[security]==2.22.0 +requests[security]==2.23.0 mailjet-rest==1.3.3 diff --git a/appengine/flexible/memcache/requirements-test.txt b/appengine/flexible/memcache/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/appengine/flexible/memcache/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/appengine/flexible/metadata/requirements-test.txt b/appengine/flexible/metadata/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/appengine/flexible/metadata/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/appengine/flexible/metadata/requirements.txt b/appengine/flexible/metadata/requirements.txt index da1bcd8111c6..22786067dc34 100644 --- a/appengine/flexible/metadata/requirements.txt +++ b/appengine/flexible/metadata/requirements.txt @@ -1,3 +1,3 @@ Flask==1.1.1 gunicorn==20.0.4 -requests[security]==2.22.0 +requests[security]==2.23.0 diff --git a/appengine/flexible/multiple_services/gateway-service/requirements-test.txt b/appengine/flexible/multiple_services/gateway-service/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/appengine/flexible/multiple_services/gateway-service/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/appengine/flexible/multiple_services/gateway-service/requirements.txt b/appengine/flexible/multiple_services/gateway-service/requirements.txt index b859df8cb3b2..40fa1c6a53fb 100644 --- a/appengine/flexible/multiple_services/gateway-service/requirements.txt +++ b/appengine/flexible/multiple_services/gateway-service/requirements.txt @@ -1,3 +1,3 @@ Flask==1.1.1 gunicorn==20.0.4 -requests==2.22.0 +requests==2.23.0 diff --git a/appengine/flexible/multiple_services/static-service/requirements-test.txt b/appengine/flexible/multiple_services/static-service/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/appengine/flexible/multiple_services/static-service/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/appengine/flexible/multiple_services/static-service/requirements.txt b/appengine/flexible/multiple_services/static-service/requirements.txt index b859df8cb3b2..40fa1c6a53fb 100644 --- a/appengine/flexible/multiple_services/static-service/requirements.txt +++ b/appengine/flexible/multiple_services/static-service/requirements.txt @@ -1,3 +1,3 @@ Flask==1.1.1 gunicorn==20.0.4 -requests==2.22.0 +requests==2.23.0 diff --git a/appengine/flexible/numpy/requirements-test.txt b/appengine/flexible/numpy/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/appengine/flexible/numpy/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/appengine/flexible/pubsub/requirements-test.txt b/appengine/flexible/pubsub/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/appengine/flexible/pubsub/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/appengine/flexible/redis/requirements-test.txt b/appengine/flexible/redis/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/appengine/flexible/redis/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/appengine/flexible/scipy/requirements-test.txt b/appengine/flexible/scipy/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/appengine/flexible/scipy/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/appengine/flexible/sendgrid/requirements-test.txt b/appengine/flexible/sendgrid/requirements-test.txt new file mode 100644 index 000000000000..41c4d5110536 --- /dev/null +++ b/appengine/flexible/sendgrid/requirements-test.txt @@ -0,0 +1,2 @@ +pytest==5.3.2 +mock==3.0.5 diff --git a/appengine/flexible/static_files/requirements-test.txt b/appengine/flexible/static_files/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/appengine/flexible/static_files/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/appengine/flexible/storage/requirements-test.txt b/appengine/flexible/storage/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/appengine/flexible/storage/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/appengine/flexible/tasks/requirements-test.txt b/appengine/flexible/tasks/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/appengine/flexible/tasks/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/appengine/flexible/twilio/requirements-test.txt b/appengine/flexible/twilio/requirements-test.txt new file mode 100644 index 000000000000..605e7026a3a1 --- /dev/null +++ b/appengine/flexible/twilio/requirements-test.txt @@ -0,0 +1,2 @@ +pytest==5.3.2 +responses==0.10.12 diff --git a/appengine/flexible/websockets/requirements-test.txt b/appengine/flexible/websockets/requirements-test.txt new file mode 100644 index 000000000000..74a22d7b3628 --- /dev/null +++ b/appengine/flexible/websockets/requirements-test.txt @@ -0,0 +1,3 @@ +pytest==5.3.2 +retrying==1.3.3 +websocket-client==0.56.0 diff --git a/appengine/flexible/websockets/requirements.txt b/appengine/flexible/websockets/requirements.txt index be55d2ff7ae0..cb58e0498b3d 100644 --- a/appengine/flexible/websockets/requirements.txt +++ b/appengine/flexible/websockets/requirements.txt @@ -1,4 +1,4 @@ Flask==1.1.1 Flask-Sockets==0.2.1 gunicorn==20.0.4 -requests==2.22.0 +requests==2.23.0 diff --git a/appengine/standard/analytics/requirements-test.txt b/appengine/standard/analytics/requirements-test.txt new file mode 100644 index 000000000000..884aa5671411 --- /dev/null +++ b/appengine/standard/analytics/requirements-test.txt @@ -0,0 +1,3 @@ +pytest==4.6.9 +gcp-devrel-py-tools==0.0.15 +responses==0.10.12 diff --git a/appengine/standard/analytics/requirements.txt b/appengine/standard/analytics/requirements.txt index 60cba42b48c9..f6773c040f1a 100644 --- a/appengine/standard/analytics/requirements.txt +++ b/appengine/standard/analytics/requirements.txt @@ -1,3 +1,3 @@ Flask==1.1.1 -requests==2.22.0 +requests==2.23.0 requests-toolbelt==0.9.1 diff --git a/appengine/standard/blobstore/blobreader/requirements-test.txt b/appengine/standard/blobstore/blobreader/requirements-test.txt new file mode 100644 index 000000000000..047916750de8 --- /dev/null +++ b/appengine/standard/blobstore/blobreader/requirements-test.txt @@ -0,0 +1,3 @@ +pytest==4.6.9 +gcp-devrel-py-tools==0.0.15 +WebTest==2.0.34 diff --git a/appengine/standard/blobstore/gcs/requirements-test.txt b/appengine/standard/blobstore/gcs/requirements-test.txt new file mode 100644 index 000000000000..047916750de8 --- /dev/null +++ b/appengine/standard/blobstore/gcs/requirements-test.txt @@ -0,0 +1,3 @@ +pytest==4.6.9 +gcp-devrel-py-tools==0.0.15 +WebTest==2.0.34 diff --git a/appengine/standard/django/requirements-test.txt b/appengine/standard/django/requirements-test.txt new file mode 100644 index 000000000000..ef16af015f40 --- /dev/null +++ b/appengine/standard/django/requirements-test.txt @@ -0,0 +1,2 @@ +pytest==4.6.9 +gcp-devrel-py-tools==0.0.15 diff --git a/appengine/standard/endpoints-frameworks-v2/echo/requirements-test.txt b/appengine/standard/endpoints-frameworks-v2/echo/requirements-test.txt new file mode 100644 index 000000000000..d6cda0b872d4 --- /dev/null +++ b/appengine/standard/endpoints-frameworks-v2/echo/requirements-test.txt @@ -0,0 +1,3 @@ +pytest==4.6.9 +gcp-devrel-py-tools==0.0.15 +mock==3.0.5 diff --git a/appengine/standard/endpoints-frameworks-v2/iata/requirements-test.txt b/appengine/standard/endpoints-frameworks-v2/iata/requirements-test.txt new file mode 100644 index 000000000000..ef16af015f40 --- /dev/null +++ b/appengine/standard/endpoints-frameworks-v2/iata/requirements-test.txt @@ -0,0 +1,2 @@ +pytest==4.6.9 +gcp-devrel-py-tools==0.0.15 diff --git a/appengine/standard/endpoints-frameworks-v2/quickstart/requirements-test.txt b/appengine/standard/endpoints-frameworks-v2/quickstart/requirements-test.txt new file mode 100644 index 000000000000..d6cda0b872d4 --- /dev/null +++ b/appengine/standard/endpoints-frameworks-v2/quickstart/requirements-test.txt @@ -0,0 +1,3 @@ +pytest==4.6.9 +gcp-devrel-py-tools==0.0.15 +mock==3.0.5 diff --git a/appengine/standard/firebase/firenotes/backend/requirements-test.txt b/appengine/standard/firebase/firenotes/backend/requirements-test.txt new file mode 100644 index 000000000000..d6cda0b872d4 --- /dev/null +++ b/appengine/standard/firebase/firenotes/backend/requirements-test.txt @@ -0,0 +1,3 @@ +pytest==4.6.9 +gcp-devrel-py-tools==0.0.15 +mock==3.0.5 diff --git a/appengine/standard/firebase/firenotes/backend/requirements.txt b/appengine/standard/firebase/firenotes/backend/requirements.txt index 649934979bb3..6c6a38aab717 100644 --- a/appengine/standard/firebase/firenotes/backend/requirements.txt +++ b/appengine/standard/firebase/firenotes/backend/requirements.txt @@ -2,5 +2,5 @@ Flask==1.1.1 pyjwt==1.7.1 flask-cors==3.0.8 google-auth==1.11.2 -requests==2.22.0 +requests==2.23.0 requests-toolbelt==0.9.1 diff --git a/appengine/standard/firebase/firetactoe/requirements-test.txt b/appengine/standard/firebase/firetactoe/requirements-test.txt new file mode 100644 index 000000000000..047916750de8 --- /dev/null +++ b/appengine/standard/firebase/firetactoe/requirements-test.txt @@ -0,0 +1,3 @@ +pytest==4.6.9 +gcp-devrel-py-tools==0.0.15 +WebTest==2.0.34 diff --git a/appengine/standard/firebase/firetactoe/requirements.txt b/appengine/standard/firebase/firetactoe/requirements.txt index 463b3772e2d8..defcca0c09ba 100644 --- a/appengine/standard/firebase/firetactoe/requirements.txt +++ b/appengine/standard/firebase/firetactoe/requirements.txt @@ -1,5 +1,5 @@ flask==1.1.1 -requests==2.22.0 +requests==2.23.0 requests_toolbelt==0.9.1 oauth2client==4.1.3 functools32==3.2.3.post2; python_version < "3" diff --git a/appengine/standard/flask/tutorial/requirements-test.txt b/appengine/standard/flask/tutorial/requirements-test.txt new file mode 100644 index 000000000000..ef16af015f40 --- /dev/null +++ b/appengine/standard/flask/tutorial/requirements-test.txt @@ -0,0 +1,2 @@ +pytest==4.6.9 +gcp-devrel-py-tools==0.0.15 diff --git a/appengine/standard/iap/requirements-test.txt b/appengine/standard/iap/requirements-test.txt new file mode 100644 index 000000000000..047916750de8 --- /dev/null +++ b/appengine/standard/iap/requirements-test.txt @@ -0,0 +1,3 @@ +pytest==4.6.9 +gcp-devrel-py-tools==0.0.15 +WebTest==2.0.34 diff --git a/appengine/standard/mailgun/requirements-test.txt b/appengine/standard/mailgun/requirements-test.txt new file mode 100644 index 000000000000..c8276f29d748 --- /dev/null +++ b/appengine/standard/mailgun/requirements-test.txt @@ -0,0 +1,5 @@ +pytest==4.6.9 +gcp-devrel-py-tools==0.0.15 +google-api-python-client==1.7.11 +mock==3.0.5 +WebTest==2.0.34 diff --git a/appengine/standard/mailjet/requirements-test.txt b/appengine/standard/mailjet/requirements-test.txt new file mode 100644 index 000000000000..884aa5671411 --- /dev/null +++ b/appengine/standard/mailjet/requirements-test.txt @@ -0,0 +1,3 @@ +pytest==4.6.9 +gcp-devrel-py-tools==0.0.15 +responses==0.10.12 diff --git a/appengine/standard/mailjet/requirements.txt b/appengine/standard/mailjet/requirements.txt index 4797b174c325..f84a8041840f 100644 --- a/appengine/standard/mailjet/requirements.txt +++ b/appengine/standard/mailjet/requirements.txt @@ -1,4 +1,4 @@ Flask==1.1.1 -requests==2.22.0 +requests==2.23.0 requests-toolbelt==0.9.1 mailjet-rest==1.3.3 diff --git a/appengine/standard/ndb/transactions/requirements-test.txt b/appengine/standard/ndb/transactions/requirements-test.txt new file mode 100644 index 000000000000..ef16af015f40 --- /dev/null +++ b/appengine/standard/ndb/transactions/requirements-test.txt @@ -0,0 +1,2 @@ +pytest==4.6.9 +gcp-devrel-py-tools==0.0.15 diff --git a/appengine/standard/noxfile-template.py b/appengine/standard/noxfile-template.py new file mode 100644 index 000000000000..0738a5d2dc47 --- /dev/null +++ b/appengine/standard/noxfile-template.py @@ -0,0 +1,174 @@ +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +from __future__ import print_function + +import os +from pathlib import Path + +import nox +import tempfile + + +# DO NOT EDIT - automatically generated. +# All versions used to tested samples. +ALL_VERSIONS = ["2.7", "3.6", "3.7", "3.8"] + +# Any default versions that should be ignored. +IGNORED_VERSIONS = ["3.6", "3.7", "3.8"] + +TESTED_VERSIONS = sorted([v for v in ALL_VERSIONS if v not in IGNORED_VERSIONS]) + +# +# Style Checks +# + + +# Ignore I202 "Additional newline in a section of imports." to accommodate +# region tags in import blocks. Since we specify an explicit ignore, we also +# have to explicitly ignore the list of default ignores: +# `E121,E123,E126,E226,E24,E704,W503,W504` as shown by `flake8 --help`. +def _determine_local_import_names(start_dir): + """Determines all import names that should be considered "local". + + This is used when running the linter to insure that import order is + properly checked. + """ + file_ext_pairs = [os.path.splitext(path) for path in os.listdir(start_dir)] + return [ + basename + for basename, extension in file_ext_pairs + if extension == ".py" + or os.path.isdir(os.path.join(start_dir, basename)) + and basename not in ("__pycache__") + ] + + +FLAKE8_COMMON_ARGS = [ + "--show-source", + "--builtin=gettext", + "--max-complexity=20", + "--import-order-style=google", + "--exclude=.nox,.cache,env,lib,generated_pb2,*_pb2.py,*_pb2_grpc.py", + "--ignore=E121,E123,E126,E203,E226,E24,E266,E501,E704,W503,W504,I100,I201,I202", + "--max-line-length=88", +] + + +@nox.session +def lint(session): + session.install("flake8", "flake8-import-order") + + local_names = _determine_local_import_names(".") + args = FLAKE8_COMMON_ARGS + [ + "--application-import-names", + ",".join(local_names), + ".", + ] + session.run("flake8", *args) + + +# +# Sample Tests +# + + +PYTEST_COMMON_ARGS = ["--junitxml=sponge_log.xml"] + + +def _session_tests(session, post_install=None): + """Runs py.test for a particular project.""" + if os.path.exists("requirements.txt"): + session.install("-r", "requirements.txt") + + if os.path.exists("requirements-test.txt"): + session.install("-r", "requirements-test.txt") + + if post_install: + post_install(session) + + session.run( + "pytest", + *(PYTEST_COMMON_ARGS + session.posargs), + # Pytest will return 5 when no tests are collected. This can happen + # on travis where slow and flaky tests are excluded. + # See http://doc.pytest.org/en/latest/_modules/_pytest/main.html + success_codes=[0, 5] + ) + + +_GAE_ROOT = os.environ.get("GAE_ROOT") +if _GAE_ROOT is None: + _GAE_ROOT = tempfile.mkdtemp() + + +def _setup_appengine_sdk(session): + """Installs the App Engine SDK, if needed.""" + session.env["GAE_SDK_PATH"] = os.path.join(_GAE_ROOT, "google_appengine") + session.run("gcp-devrel-py-tools", "download-appengine-sdk", _GAE_ROOT) + + +@nox.session(python=ALL_VERSIONS) +def py(session): + """Runs py.test for a sample using the specified version of Python.""" + if session.python in TESTED_VERSIONS: + # Create a lib directory if needed, + # otherwise the App Engine vendor library will complain. + if not os.path.isdir("lib"): + os.mkdir("lib") + + # mailjet_rest has an issue with requests being required pre install + # https://github.com/mailjet/mailjet-apiv3-python/issues/38 + if 'appengine/standard/mailjet' in os.getcwd(): + session.install("requests") + + _session_tests(session, post_install=_setup_appengine_sdk) + else: + print("SKIPPED: {} tests are disabled for this sample.".format(session.python)) + + +# +# Readmegen +# + + +def _get_repo_root(): + """ Returns the root folder of the project. """ + # Get root of this repository. Assume we don't have directories nested deeper than 10 items. + p = Path(os.getcwd()) + for i in range(10): + if p is None: + break + if Path(p / ".git").exists(): + return str(p) + p = p.parent + raise Exception("Unable to detect repository root.") + + +GENERATED_READMES = sorted([x for x in Path(".").rglob("*.rst.in")]) + + +@nox.session +@nox.parametrize("path", GENERATED_READMES) +def readmegen(session, path): + """(Re-)generates the readme for a sample.""" + session.install("jinja2", "pyyaml") + + if os.path.exists(os.path.join(path, "requirements.txt")): + session.install("-r", os.path.join(path, "requirements.txt")) + + in_file = os.path.join(path, "README.rst.in") + session.run( + "python", _get_repo_root() + "/scripts/readme-gen/readme_gen.py", in_file + ) diff --git a/appengine/standard/pubsub/requirements-test.txt b/appengine/standard/pubsub/requirements-test.txt new file mode 100644 index 000000000000..ef16af015f40 --- /dev/null +++ b/appengine/standard/pubsub/requirements-test.txt @@ -0,0 +1,2 @@ +pytest==4.6.9 +gcp-devrel-py-tools==0.0.15 diff --git a/appengine/standard/sendgrid/requirements-test.txt b/appengine/standard/sendgrid/requirements-test.txt new file mode 100644 index 000000000000..0546b20f8259 --- /dev/null +++ b/appengine/standard/sendgrid/requirements-test.txt @@ -0,0 +1,4 @@ +pytest==4.6.9 +gcp-devrel-py-tools==0.0.15 +mock==3.0.5 +WebTest==2.0.34 diff --git a/appengine/standard/storage/api-client/requirements-test.txt b/appengine/standard/storage/api-client/requirements-test.txt new file mode 100644 index 000000000000..047916750de8 --- /dev/null +++ b/appengine/standard/storage/api-client/requirements-test.txt @@ -0,0 +1,3 @@ +pytest==4.6.9 +gcp-devrel-py-tools==0.0.15 +WebTest==2.0.34 diff --git a/appengine/standard/storage/appengine-client/requirements-test.txt b/appengine/standard/storage/appengine-client/requirements-test.txt new file mode 100644 index 000000000000..047916750de8 --- /dev/null +++ b/appengine/standard/storage/appengine-client/requirements-test.txt @@ -0,0 +1,3 @@ +pytest==4.6.9 +gcp-devrel-py-tools==0.0.15 +WebTest==2.0.34 diff --git a/appengine/standard/urlfetch/requests/requirements-test.txt b/appengine/standard/urlfetch/requests/requirements-test.txt new file mode 100644 index 000000000000..ef16af015f40 --- /dev/null +++ b/appengine/standard/urlfetch/requests/requirements-test.txt @@ -0,0 +1,2 @@ +pytest==4.6.9 +gcp-devrel-py-tools==0.0.15 diff --git a/appengine/standard/urlfetch/requests/requirements.txt b/appengine/standard/urlfetch/requests/requirements.txt index 60cba42b48c9..f6773c040f1a 100644 --- a/appengine/standard/urlfetch/requests/requirements.txt +++ b/appengine/standard/urlfetch/requests/requirements.txt @@ -1,3 +1,3 @@ Flask==1.1.1 -requests==2.22.0 +requests==2.23.0 requests-toolbelt==0.9.1 diff --git a/appengine/standard_python37/bigquery/requirements-test.txt b/appengine/standard_python37/bigquery/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/appengine/standard_python37/bigquery/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/appengine/standard_python37/building-an-app/building-an-app-1/requirements-test.txt b/appengine/standard_python37/building-an-app/building-an-app-1/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/appengine/standard_python37/building-an-app/building-an-app-1/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/appengine/standard_python37/building-an-app/building-an-app-2/requirements-test.txt b/appengine/standard_python37/building-an-app/building-an-app-2/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/appengine/standard_python37/building-an-app/building-an-app-2/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/appengine/standard_python37/building-an-app/building-an-app-3/requirements-test.txt b/appengine/standard_python37/building-an-app/building-an-app-3/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/appengine/standard_python37/building-an-app/building-an-app-3/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/appengine/standard_python37/building-an-app/building-an-app-3/requirements.txt b/appengine/standard_python37/building-an-app/building-an-app-3/requirements.txt index e04b52ff2aa5..98f8180374ae 100644 --- a/appengine/standard_python37/building-an-app/building-an-app-3/requirements.txt +++ b/appengine/standard_python37/building-an-app/building-an-app-3/requirements.txt @@ -1,4 +1,4 @@ Flask==1.1.1 google-cloud-datastore==1.11.0 google-auth==1.11.2 -requests==2.22.0 +requests==2.23.0 diff --git a/appengine/standard_python37/building-an-app/building-an-app-4/requirements-test.txt b/appengine/standard_python37/building-an-app/building-an-app-4/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/appengine/standard_python37/building-an-app/building-an-app-4/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/appengine/standard_python37/building-an-app/building-an-app-4/requirements.txt b/appengine/standard_python37/building-an-app/building-an-app-4/requirements.txt index e04b52ff2aa5..98f8180374ae 100644 --- a/appengine/standard_python37/building-an-app/building-an-app-4/requirements.txt +++ b/appengine/standard_python37/building-an-app/building-an-app-4/requirements.txt @@ -1,4 +1,4 @@ Flask==1.1.1 google-cloud-datastore==1.11.0 google-auth==1.11.2 -requests==2.22.0 +requests==2.23.0 diff --git a/appengine/standard_python37/cloud_debugger/requirements-test.txt b/appengine/standard_python37/cloud_debugger/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/appengine/standard_python37/cloud_debugger/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/appengine/standard_python37/cloudsql/requirements-test.txt b/appengine/standard_python37/cloudsql/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/appengine/standard_python37/cloudsql/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/appengine/standard_python37/custom-server/requirements-test.txt b/appengine/standard_python37/custom-server/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/appengine/standard_python37/custom-server/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/appengine/standard_python37/django/requirements-test.txt b/appengine/standard_python37/django/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/appengine/standard_python37/django/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/appengine/standard_python37/hello_world/requirements-test.txt b/appengine/standard_python37/hello_world/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/appengine/standard_python37/hello_world/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/appengine/standard_python37/pubsub/requirements-test.txt b/appengine/standard_python37/pubsub/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/appengine/standard_python37/pubsub/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/appengine/standard_python37/redis/requirements-test.txt b/appengine/standard_python37/redis/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/appengine/standard_python37/redis/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/appengine/standard_python37/spanner/requirements-test.txt b/appengine/standard_python37/spanner/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/appengine/standard_python37/spanner/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/appengine/standard_python37/warmup/requirements-test.txt b/appengine/standard_python37/warmup/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/appengine/standard_python37/warmup/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/asset/cloud-client/requirements-test.txt b/asset/cloud-client/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/asset/cloud-client/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/auth/api-client/requirements-test.txt b/auth/api-client/requirements-test.txt new file mode 100644 index 000000000000..41c4d5110536 --- /dev/null +++ b/auth/api-client/requirements-test.txt @@ -0,0 +1,2 @@ +pytest==5.3.2 +mock==3.0.5 diff --git a/auth/cloud-client/requirements-test.txt b/auth/cloud-client/requirements-test.txt new file mode 100644 index 000000000000..41c4d5110536 --- /dev/null +++ b/auth/cloud-client/requirements-test.txt @@ -0,0 +1,2 @@ +pytest==5.3.2 +mock==3.0.5 diff --git a/auth/end-user/web/requirements-test.txt b/auth/end-user/web/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/auth/end-user/web/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/auth/end-user/web/requirements.txt b/auth/end-user/web/requirements.txt index 9d6f856b5e84..249abab5602f 100644 --- a/auth/end-user/web/requirements.txt +++ b/auth/end-user/web/requirements.txt @@ -3,4 +3,4 @@ google-auth-oauthlib==0.4.1 google-auth-httplib2==0.0.3 google-api-python-client==1.7.11 flask==1.1.1 -requests==2.22.0 +requests==2.23.0 diff --git a/auth/http-client/requirements-test.txt b/auth/http-client/requirements-test.txt new file mode 100644 index 000000000000..99c8f2a3cfea --- /dev/null +++ b/auth/http-client/requirements-test.txt @@ -0,0 +1,2 @@ +pytest==5.3.2 +mock==3.0.5 \ No newline at end of file diff --git a/auth/http-client/requirements.txt b/auth/http-client/requirements.txt index 4c54c10b4e50..fb2fe3103207 100644 --- a/auth/http-client/requirements.txt +++ b/auth/http-client/requirements.txt @@ -1,2 +1,2 @@ -requests==2.22.0 +requests==2.23.0 google-auth==1.11.2 diff --git a/automl/beta/requirements-test.txt b/automl/beta/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/automl/beta/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/automl/cloud-client/requirements-test.txt b/automl/cloud-client/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/automl/cloud-client/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/bigquery/bqml/requirements-test.txt b/bigquery/bqml/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/bigquery/bqml/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/bigquery/cloud-client/requirements-test.txt b/bigquery/cloud-client/requirements-test.txt new file mode 100644 index 000000000000..41c4d5110536 --- /dev/null +++ b/bigquery/cloud-client/requirements-test.txt @@ -0,0 +1,2 @@ +pytest==5.3.2 +mock==3.0.5 diff --git a/bigquery/datalab-migration/requirements-test.txt b/bigquery/datalab-migration/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/bigquery/datalab-migration/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/bigquery/pandas-gbq-migration/requirements-test.txt b/bigquery/pandas-gbq-migration/requirements-test.txt new file mode 100644 index 000000000000..41c4d5110536 --- /dev/null +++ b/bigquery/pandas-gbq-migration/requirements-test.txt @@ -0,0 +1,2 @@ +pytest==5.3.2 +mock==3.0.5 diff --git a/bigquery/transfer/cloud-client/requirements-test.txt b/bigquery/transfer/cloud-client/requirements-test.txt new file mode 100644 index 000000000000..41c4d5110536 --- /dev/null +++ b/bigquery/transfer/cloud-client/requirements-test.txt @@ -0,0 +1,2 @@ +pytest==5.3.2 +mock==3.0.5 diff --git a/bigquery_storage/to_dataframe/requirements-test.txt b/bigquery_storage/to_dataframe/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/bigquery_storage/to_dataframe/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/bigtable/hello/requirements-test.txt b/bigtable/hello/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/bigtable/hello/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/bigtable/hello_happybase/requirements-test.txt b/bigtable/hello_happybase/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/bigtable/hello_happybase/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/bigtable/instanceadmin/requirements-test.txt b/bigtable/instanceadmin/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/bigtable/instanceadmin/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/bigtable/metricscaler/requirements-test.txt b/bigtable/metricscaler/requirements-test.txt new file mode 100644 index 000000000000..41c4d5110536 --- /dev/null +++ b/bigtable/metricscaler/requirements-test.txt @@ -0,0 +1,2 @@ +pytest==5.3.2 +mock==3.0.5 diff --git a/bigtable/quickstart/requirements-test.txt b/bigtable/quickstart/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/bigtable/quickstart/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/bigtable/quickstart_happybase/requirements-test.txt b/bigtable/quickstart_happybase/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/bigtable/quickstart_happybase/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/bigtable/snippets/filters/requirements-test.txt b/bigtable/snippets/filters/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/bigtable/snippets/filters/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/bigtable/snippets/reads/requirements-test.txt b/bigtable/snippets/reads/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/bigtable/snippets/reads/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/bigtable/snippets/writes/requirements-test.txt b/bigtable/snippets/writes/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/bigtable/snippets/writes/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/bigtable/tableadmin/requirements-test.txt b/bigtable/tableadmin/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/bigtable/tableadmin/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/blog/introduction_to_data_models_in_cloud_datastore/requirements-test.txt b/blog/introduction_to_data_models_in_cloud_datastore/requirements-test.txt new file mode 100644 index 000000000000..1f10be83760a --- /dev/null +++ b/blog/introduction_to_data_models_in_cloud_datastore/requirements-test.txt @@ -0,0 +1,3 @@ +pytest==5.3.2 +gcp-devrel-py-tools==0.0.15 +flaky==3.6.1 diff --git a/cdn/requirements-test.txt b/cdn/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/cdn/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/cloud-sql/mysql/sqlalchemy/requirements-test.txt b/cloud-sql/mysql/sqlalchemy/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/cloud-sql/mysql/sqlalchemy/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/cloud-sql/postgres/sqlalchemy/requirements-test.txt b/cloud-sql/postgres/sqlalchemy/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/cloud-sql/postgres/sqlalchemy/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/codelabs/flex_and_vision/requirements-test.txt b/codelabs/flex_and_vision/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/codelabs/flex_and_vision/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/composer/rest/requirements-test.txt b/composer/rest/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/composer/rest/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/composer/rest/requirements.txt b/composer/rest/requirements.txt index 1b5f33535ce9..f1cc17b84aa6 100644 --- a/composer/rest/requirements.txt +++ b/composer/rest/requirements.txt @@ -1,3 +1,3 @@ google-auth==1.11.2 -requests==2.22.0 +requests==2.23.0 six==1.14.0 diff --git a/composer/workflows/requirements-test.txt b/composer/workflows/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/composer/workflows/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/compute/api/requirements-test.txt b/compute/api/requirements-test.txt new file mode 100644 index 000000000000..1f10be83760a --- /dev/null +++ b/compute/api/requirements-test.txt @@ -0,0 +1,3 @@ +pytest==5.3.2 +gcp-devrel-py-tools==0.0.15 +flaky==3.6.1 diff --git a/compute/auth/requirements-test.txt b/compute/auth/requirements-test.txt new file mode 100644 index 000000000000..41c4d5110536 --- /dev/null +++ b/compute/auth/requirements-test.txt @@ -0,0 +1,2 @@ +pytest==5.3.2 +mock==3.0.5 diff --git a/compute/auth/requirements.txt b/compute/auth/requirements.txt index 2b78ce88f778..ad29decac00a 100644 --- a/compute/auth/requirements.txt +++ b/compute/auth/requirements.txt @@ -1,4 +1,4 @@ -requests==2.22.0 +requests==2.23.0 google-api-python-client==1.7.11 google-auth==1.11.2 google-auth-httplib2==0.0.3 diff --git a/compute/encryption/requirements-test.txt b/compute/encryption/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/compute/encryption/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/compute/encryption/requirements.txt b/compute/encryption/requirements.txt index f65acb3733e8..ff122fc12092 100644 --- a/compute/encryption/requirements.txt +++ b/compute/encryption/requirements.txt @@ -1,5 +1,5 @@ cryptography==2.8 -requests==2.22.0 +requests==2.23.0 google-api-python-client==1.7.11 google-auth==1.11.2 google-auth-httplib2==0.0.3 diff --git a/compute/managed-instances/demo/requirements-test.txt b/compute/managed-instances/demo/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/compute/managed-instances/demo/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/compute/managed-instances/demo/requirements.txt b/compute/managed-instances/demo/requirements.txt index 34bbf9ca1bf0..5bab2a954180 100644 --- a/compute/managed-instances/demo/requirements.txt +++ b/compute/managed-instances/demo/requirements.txt @@ -1,2 +1,2 @@ flask==1.1.1 -requests==2.22.0 +requests==2.23.0 diff --git a/compute/metadata/requirements-test.txt b/compute/metadata/requirements-test.txt new file mode 100644 index 000000000000..41c4d5110536 --- /dev/null +++ b/compute/metadata/requirements-test.txt @@ -0,0 +1,2 @@ +pytest==5.3.2 +mock==3.0.5 diff --git a/compute/metadata/requirements.txt b/compute/metadata/requirements.txt index 566083cb6be8..b4500579db51 100644 --- a/compute/metadata/requirements.txt +++ b/compute/metadata/requirements.txt @@ -1 +1 @@ -requests==2.22.0 +requests==2.23.0 diff --git a/compute/oslogin/requirements-test.txt b/compute/oslogin/requirements-test.txt new file mode 100644 index 000000000000..41c4d5110536 --- /dev/null +++ b/compute/oslogin/requirements-test.txt @@ -0,0 +1,2 @@ +pytest==5.3.2 +mock==3.0.5 diff --git a/compute/oslogin/requirements.txt b/compute/oslogin/requirements.txt index c27ca15eca9f..90171c249a91 100644 --- a/compute/oslogin/requirements.txt +++ b/compute/oslogin/requirements.txt @@ -1,3 +1,4 @@ google-api-python-client==1.7.11 google-auth==1.11.2 google-auth-httplib2==0.0.3 +requests==2.23.0 diff --git a/compute/xmpp_wikibot/requirements-test.txt b/compute/xmpp_wikibot/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/compute/xmpp_wikibot/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/compute/xmpp_wikibot/requirements.txt b/compute/xmpp_wikibot/requirements.txt index c51de5fc6700..7bad33b537ff 100644 --- a/compute/xmpp_wikibot/requirements.txt +++ b/compute/xmpp_wikibot/requirements.txt @@ -1,4 +1,4 @@ Flask==1.1.1 -requests==2.22.0 +requests==2.23.0 sleekxmpp==1.3.3 six==1.14.0 diff --git a/conftest.py b/conftest.py deleted file mode 100644 index 104baa322040..000000000000 --- a/conftest.py +++ /dev/null @@ -1,38 +0,0 @@ -# Copyright 2016 Google Inc. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import os - -import mock -import pytest - -PROJECT = os.environ['GCLOUD_PROJECT'] - - -@pytest.fixture -def api_client_inject_project_id(): - """Patches all googleapiclient requests to replace 'YOUR_PROJECT_ID' with - the project ID.""" - import googleapiclient.http - - old_execute = googleapiclient.http.HttpRequest.execute - - def new_execute(self, http=None, num_retries=0): - self.uri = self.uri.replace('YOUR_PROJECT_ID', PROJECT) - return old_execute(self, http=http, num_retries=num_retries) - - with mock.patch( - 'googleapiclient.http.HttpRequest.execute', - new=new_execute): - yield diff --git a/container_registry/container_analysis/requirements-test.txt b/container_registry/container_analysis/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/container_registry/container_analysis/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/datacatalog/cloud-client/requirements-test.txt b/datacatalog/cloud-client/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/datacatalog/cloud-client/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/dataflow/encryption-keys/requirements-test.txt b/dataflow/encryption-keys/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/dataflow/encryption-keys/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/dataflow/flex-templates/streaming_beam/requirements-test.txt b/dataflow/flex-templates/streaming_beam/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/dataflow/flex-templates/streaming_beam/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/dataflow/run_template/requirements-test.txt b/dataflow/run_template/requirements-test.txt new file mode 100644 index 000000000000..5a5910a318d7 --- /dev/null +++ b/dataflow/run_template/requirements-test.txt @@ -0,0 +1,2 @@ +pytest==5.3.2 +flask==1.1.1 diff --git a/datalabeling/requirements-test.txt b/datalabeling/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/datalabeling/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/dataproc/requirements-test.txt b/dataproc/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/dataproc/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/datastore/cloud-client/requirements-test.txt b/datastore/cloud-client/requirements-test.txt new file mode 100644 index 000000000000..1f10be83760a --- /dev/null +++ b/datastore/cloud-client/requirements-test.txt @@ -0,0 +1,3 @@ +pytest==5.3.2 +gcp-devrel-py-tools==0.0.15 +flaky==3.6.1 diff --git a/datastore/cloud-ndb/requirements-test.txt b/datastore/cloud-ndb/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/datastore/cloud-ndb/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/dialogflow/cloud-client/requirements-test.txt b/dialogflow/cloud-client/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/dialogflow/cloud-client/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/dlp/requirements-test.txt b/dlp/requirements-test.txt new file mode 100644 index 000000000000..d1ad7a9fd107 --- /dev/null +++ b/dlp/requirements-test.txt @@ -0,0 +1,4 @@ +pytest==5.3.2 +gcp-devrel-py-tools==0.0.15 +flaky==3.6.1 +mock==3.0.5 diff --git a/dns/api/requirements-test.txt b/dns/api/requirements-test.txt new file mode 100644 index 000000000000..1f10be83760a --- /dev/null +++ b/dns/api/requirements-test.txt @@ -0,0 +1,3 @@ +pytest==5.3.2 +gcp-devrel-py-tools==0.0.15 +flaky==3.6.1 diff --git a/endpoints/bookstore-grpc-transcoding/requirements-test.txt b/endpoints/bookstore-grpc-transcoding/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/endpoints/bookstore-grpc-transcoding/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/endpoints/bookstore-grpc/requirements-test.txt b/endpoints/bookstore-grpc/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/endpoints/bookstore-grpc/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/endpoints/getting-started-grpc/requirements-test.txt b/endpoints/getting-started-grpc/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/endpoints/getting-started-grpc/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/endpoints/getting-started/clients/service_to_service_non_default/requirements-test.txt b/endpoints/getting-started/clients/service_to_service_non_default/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/endpoints/getting-started/clients/service_to_service_non_default/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/endpoints/getting-started/requirements-test.txt b/endpoints/getting-started/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/endpoints/getting-started/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/endpoints/getting-started/requirements.txt b/endpoints/getting-started/requirements.txt index 96b7f6a9bd54..71ee4cd98ff9 100644 --- a/endpoints/getting-started/requirements.txt +++ b/endpoints/getting-started/requirements.txt @@ -3,6 +3,6 @@ flask-cors==3.0.8 gunicorn==20.0.4 six==1.14.0 pyyaml==5.3.1 -requests==2.22.0 +requests==2.23.0 google-auth==1.11.2 google-auth-oauthlib==0.4.1 diff --git a/error_reporting/api/requirements-test.txt b/error_reporting/api/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/error_reporting/api/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/error_reporting/fluent_on_compute/requirements-test.txt b/error_reporting/fluent_on_compute/requirements-test.txt new file mode 100644 index 000000000000..41c4d5110536 --- /dev/null +++ b/error_reporting/fluent_on_compute/requirements-test.txt @@ -0,0 +1,2 @@ +pytest==5.3.2 +mock==3.0.5 diff --git a/firestore/cloud-client/requirements-test.txt b/firestore/cloud-client/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/firestore/cloud-client/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/functions/billing/requirements-test.txt b/functions/billing/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/functions/billing/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/functions/composer/requirements-test.txt b/functions/composer/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/functions/composer/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/functions/firebase/requirements-test.txt b/functions/firebase/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/functions/firebase/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/functions/helloworld/requirements-test.txt b/functions/helloworld/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/functions/helloworld/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/functions/http/requirements-test.txt b/functions/http/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/functions/http/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/functions/imagemagick/requirements-test.txt b/functions/imagemagick/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/functions/imagemagick/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/functions/log/requirements-test.txt b/functions/log/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/functions/log/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/functions/memorystore/redis/requirements-test.txt b/functions/memorystore/redis/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/functions/memorystore/redis/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/functions/ocr/app/requirements-test.txt b/functions/ocr/app/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/functions/ocr/app/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/functions/slack/requirements-test.txt b/functions/slack/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/functions/slack/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/functions/spanner/requirements-test.txt b/functions/spanner/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/functions/spanner/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/functions/sql/requirements-test.txt b/functions/sql/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/functions/sql/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/functions/tips/requirements-test.txt b/functions/tips/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/functions/tips/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/functions/tips/requirements.txt b/functions/tips/requirements.txt index 66307282f5b0..47146c8ef8ee 100644 --- a/functions/tips/requirements.txt +++ b/functions/tips/requirements.txt @@ -1,5 +1,5 @@ google-cloud-error-reporting==0.33.0 google-cloud-pubsub==1.1.0 python-dateutil==2.8.1 -requests==2.22.0 +requests==2.23.0 xmltodict==0.12.0 diff --git a/healthcare/api-client/datasets/requirements-test.txt b/healthcare/api-client/datasets/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/healthcare/api-client/datasets/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/healthcare/api-client/dicom/requirements-test.txt b/healthcare/api-client/dicom/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/healthcare/api-client/dicom/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/healthcare/api-client/dicom/requirements.txt b/healthcare/api-client/dicom/requirements.txt index 47ffdab6d8b3..70d62029a659 100644 --- a/healthcare/api-client/dicom/requirements.txt +++ b/healthcare/api-client/dicom/requirements.txt @@ -2,4 +2,4 @@ google-api-python-client==1.7.11 google-auth-httplib2==0.0.3 google-auth==1.11.2 google-cloud==0.34.0 -requests==2.22.0 +requests==2.23.0 diff --git a/healthcare/api-client/fhir/requirements-test.txt b/healthcare/api-client/fhir/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/healthcare/api-client/fhir/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/healthcare/api-client/fhir/requirements.txt b/healthcare/api-client/fhir/requirements.txt index 4c2b53f0d6ec..9374a394b648 100644 --- a/healthcare/api-client/fhir/requirements.txt +++ b/healthcare/api-client/fhir/requirements.txt @@ -3,4 +3,4 @@ google-auth-httplib2==0.0.3 google-auth==1.11.2 google-cloud==0.34.0 google-cloud-storage==1.26.0 -requests==2.22.0 +requests==2.23.0 diff --git a/healthcare/api-client/hl7v2/requirements-test.txt b/healthcare/api-client/hl7v2/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/healthcare/api-client/hl7v2/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/iam/api-client/requirements-test.txt b/iam/api-client/requirements-test.txt new file mode 100644 index 000000000000..1cfcb6852802 --- /dev/null +++ b/iam/api-client/requirements-test.txt @@ -0,0 +1,2 @@ +pytest==5.3.2 +gcp-devrel-py-tools==0.0.15 diff --git a/iap/app_engine_app/requirements-test.txt b/iap/app_engine_app/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/iap/app_engine_app/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/iap/requirements-test.txt b/iap/requirements-test.txt new file mode 100644 index 000000000000..1f10be83760a --- /dev/null +++ b/iap/requirements-test.txt @@ -0,0 +1,3 @@ +pytest==5.3.2 +gcp-devrel-py-tools==0.0.15 +flaky==3.6.1 diff --git a/iap/requirements.txt b/iap/requirements.txt index 1a7757aa8b2f..4e7353833f44 100644 --- a/iap/requirements.txt +++ b/iap/requirements.txt @@ -3,5 +3,5 @@ cryptography==2.8 flask==1.1.1 google-auth==1.11.2 gunicorn==20.0.4 -requests==2.22.0 +requests==2.23.0 requests_toolbelt==0.9.1 diff --git a/iot/api-client/codelabs/requirements-test.txt b/iot/api-client/codelabs/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/iot/api-client/codelabs/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/iot/api-client/end_to_end_example/requirements-test.txt b/iot/api-client/end_to_end_example/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/iot/api-client/end_to_end_example/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/iot/api-client/gcs_file_to_device/requirements-test.txt b/iot/api-client/gcs_file_to_device/requirements-test.txt new file mode 100644 index 000000000000..41c4d5110536 --- /dev/null +++ b/iot/api-client/gcs_file_to_device/requirements-test.txt @@ -0,0 +1,2 @@ +pytest==5.3.2 +mock==3.0.5 diff --git a/iot/api-client/http_example/requirements-test.txt b/iot/api-client/http_example/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/iot/api-client/http_example/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/iot/api-client/http_example/requirements.txt b/iot/api-client/http_example/requirements.txt index 906cbf021c21..52058ea30af5 100644 --- a/iot/api-client/http_example/requirements.txt +++ b/iot/api-client/http_example/requirements.txt @@ -5,4 +5,4 @@ google-auth==1.11.2 google-cloud-iot==1.0.0 google-cloud-pubsub==1.1.0 pyjwt==1.7.1 -requests==2.22.0 +requests==2.23.0 diff --git a/iot/api-client/manager/requirements-test.txt b/iot/api-client/manager/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/iot/api-client/manager/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/iot/api-client/mqtt_example/requirements-test.txt b/iot/api-client/mqtt_example/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/iot/api-client/mqtt_example/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/iot/api-client/scripts/requirements-test.txt b/iot/api-client/scripts/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/iot/api-client/scripts/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/jobs/v3/api_client/requirements-test.txt b/jobs/v3/api_client/requirements-test.txt new file mode 100644 index 000000000000..1f10be83760a --- /dev/null +++ b/jobs/v3/api_client/requirements-test.txt @@ -0,0 +1,3 @@ +pytest==5.3.2 +gcp-devrel-py-tools==0.0.15 +flaky==3.6.1 diff --git a/kms/api-client/quickstart_test.py b/kms/api-client/quickstart_test.py index 0db901e6bf3e..5a457518c8fb 100644 --- a/kms/api-client/quickstart_test.py +++ b/kms/api-client/quickstart_test.py @@ -13,7 +13,7 @@ # limitations under the License. -def test_quickstart(api_client_inject_project_id): +def test_quickstart(): import quickstart quickstart.run_quickstart() diff --git a/kms/api-client/requirements-test.txt b/kms/api-client/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/kms/api-client/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/kubernetes_engine/api-client/requirements-test.txt b/kubernetes_engine/api-client/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/kubernetes_engine/api-client/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/kubernetes_engine/django_tutorial/requirements-test.txt b/kubernetes_engine/django_tutorial/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/kubernetes_engine/django_tutorial/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/language/api/requirements-test.txt b/language/api/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/language/api/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/language/automl/requirements-test.txt b/language/automl/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/language/automl/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/language/classify_text/requirements-test.txt b/language/classify_text/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/language/classify_text/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/language/cloud-client/v1/requirements-test.txt b/language/cloud-client/v1/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/language/cloud-client/v1/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/language/generated-samples/v1/requirements-test.txt b/language/generated-samples/v1/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/language/generated-samples/v1/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/language/sentiment/requirements-test.txt b/language/sentiment/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/language/sentiment/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/logging/cloud-client/requirements-test.txt b/logging/cloud-client/requirements-test.txt new file mode 100644 index 000000000000..1cfcb6852802 --- /dev/null +++ b/logging/cloud-client/requirements-test.txt @@ -0,0 +1,2 @@ +pytest==5.3.2 +gcp-devrel-py-tools==0.0.15 diff --git a/memorystore/redis/requirements-test.txt b/memorystore/redis/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/memorystore/redis/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/ml_engine/online_prediction/requirements-test.txt b/ml_engine/online_prediction/requirements-test.txt new file mode 100644 index 000000000000..1f10be83760a --- /dev/null +++ b/ml_engine/online_prediction/requirements-test.txt @@ -0,0 +1,3 @@ +pytest==5.3.2 +gcp-devrel-py-tools==0.0.15 +flaky==3.6.1 diff --git a/monitoring/api/v3/alerts-client/requirements-test.txt b/monitoring/api/v3/alerts-client/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/monitoring/api/v3/alerts-client/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/monitoring/api/v3/api-client/requirements-test.txt b/monitoring/api/v3/api-client/requirements-test.txt new file mode 100644 index 000000000000..6e69b9d07159 --- /dev/null +++ b/monitoring/api/v3/api-client/requirements-test.txt @@ -0,0 +1,4 @@ +pytest==5.3.2 +gcp-devrel-py-tools==0.0.15 +google-cloud-core==1.3.0 +flaky==3.6.1 diff --git a/monitoring/api/v3/cloud-client/requirements-test.txt b/monitoring/api/v3/cloud-client/requirements-test.txt new file mode 100644 index 000000000000..53eb762b9949 --- /dev/null +++ b/monitoring/api/v3/cloud-client/requirements-test.txt @@ -0,0 +1,4 @@ +pytest==5.3.2 +mock==3.0.5 +gcp-devrel-py-tools==0.0.15 +google-cloud-core==1.3.0 diff --git a/monitoring/api/v3/uptime-check-client/requirements-test.txt b/monitoring/api/v3/uptime-check-client/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/monitoring/api/v3/uptime-check-client/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/notebooks/requirements-test.txt b/notebooks/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/notebooks/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/noxfile-template.py b/noxfile-template.py index 918239a80f4b..5f3360da1ba4 100644 --- a/noxfile-template.py +++ b/noxfile-template.py @@ -14,63 +14,30 @@ from __future__ import print_function -import fnmatch import os from pathlib import Path -import tempfile import nox -# Get root of this repository. Assume we don't have directories nested deeper than 10 items. -p = Path(os.getcwd()) -for i in range(10): - if p is None: - raise Exception("Unable to detect repository root.") - if Path(p / ".git").exists(): - REPO_ROOT = str(p) - break - p = p.parent -# -# Helpers and utility functions -# - - -def _list_files(folder, pattern): - """Lists all files below the given folder that match the pattern.""" - for root, folders, files in os.walk(folder): - for filename in files: - if fnmatch.fnmatch(filename, pattern): - yield os.path.join(root, filename) +# DO NOT EDIT - automatically generated. +# All versions used to tested samples. +ALL_VERSIONS = ["2.7", "3.6", "3.7", "3.8"] +# Any default versions that should be ignored. +IGNORED_VERSIONS = ["2.7"] -def _collect_dirs( - start_dir, - blacklist=set(["conftest.py", "noxfile.py", "lib", "third_party"]), - suffix="requirements.txt", - recurse_further=False, -): - """Recursively collects a list of dirs that contain a file matching the - given suffix. +TESTED_VERSIONS = sorted([v for v in ALL_VERSIONS if v not in IGNORED_VERSIONS]) - This works by listing the contents of directories and finding - directories that have `"requirements.text` files. - """ - # Collect all the directories that have tests in them. - for parent, subdirs, files in os.walk(start_dir): - if "./." in parent: - continue # Skip top-level dotfiles - elif any(f for f in files if f.endswith(suffix) and f not in blacklist): - # Don't recurse further for tests, since py.test will do that. - if not recurse_further: - del subdirs[:] - # This dir has desired files in it. yield it. - yield parent - else: - # Filter out dirs we don't want to recurse into - subdirs[:] = [s for s in subdirs if s[0].isalpha() and s not in blacklist] +# +# Style Checks +# +# Ignore I202 "Additional newline in a section of imports." to accommodate +# region tags in import blocks. Since we specify an explicit ignore, we also +# have to explicitly ignore the list of default ignores: +# `E121,E123,E126,E226,E24,E704,W503,W504` as shown by `flake8 --help`. def _determine_local_import_names(start_dir): """Determines all import names that should be considered "local". @@ -87,75 +54,46 @@ def _determine_local_import_names(start_dir): ] -# -# App Engine specific helpers -# - - -_GAE_ROOT = os.environ.get("GAE_ROOT") -if _GAE_ROOT is None: - _GAE_ROOT = tempfile.mkdtemp() - - -def _setup_appengine_sdk(session): - """Installs the App Engine SDK, if needed.""" - session.env["GAE_SDK_PATH"] = os.path.join(_GAE_ROOT, "google_appengine") - session.run("gcp-devrel-py-tools", "download-appengine-sdk", _GAE_ROOT) - - -# -# Test sessions -# - - -PYTEST_COMMON_ARGS = ["--junitxml=sponge_log.xml"] - -# Ignore I202 "Additional newline in a section of imports." to accommodate -# region tags in import blocks. Since we specify an explicit ignore, we also -# have to explicitly ignore the list of default ignores: -# `E121,E123,E126,E226,E24,E704,W503,W504` as shown by `flake8 --help`. FLAKE8_COMMON_ARGS = [ "--show-source", - "--builtin", - "gettext", - "--max-complexity", - "20", - "--import-order-style", - "google", - "--exclude", - ".nox,.cache,env,lib,generated_pb2,*_pb2.py,*_pb2_grpc.py", - "--ignore=E121,E123,E126,E203, E226,E24,E266,E501,E704,W503,W504,I100,I201,I202", + "--builtin=gettext", + "--max-complexity=20", + "--import-order-style=google", + "--exclude=.nox,.cache,env,lib,generated_pb2,*_pb2.py,*_pb2_grpc.py", + "--ignore=E121,E123,E126,E203,E226,E24,E266,E501,E704,W503,W504,I100,I201,I202", "--max-line-length=88", ] -# Collect sample directories. -ALL_TESTED_SAMPLES = sorted(list(_collect_dirs("."))) +@nox.session +def lint(session): + session.install("flake8", "flake8-import-order") -GAE_STANDARD_SAMPLES = [ - sample - for sample in ALL_TESTED_SAMPLES - if str(Path(sample).absolute().relative_to(REPO_ROOT)).startswith( - "appengine/standard/" - ) -] + local_names = _determine_local_import_names(".") + args = FLAKE8_COMMON_ARGS + [ + "--application-import-names", + ",".join(local_names), + ".", + ] + session.run("flake8", *args) -PY2_ONLY_SAMPLES = GAE_STANDARD_SAMPLES -NON_GAE_STANDARD_SAMPLES_PY3 = sorted( - list(set(ALL_TESTED_SAMPLES) - set(GAE_STANDARD_SAMPLES)) -) +# +# Sample Tests +# -def _session_tests(session, sample, post_install=None): - """Runs py.test for a particular sample.""" - session.install("-r", REPO_ROOT + "/testing/requirements.txt") +PYTEST_COMMON_ARGS = ["--junitxml=sponge_log.xml"] - session.chdir(sample) +def _session_tests(session, post_install=None): + """Runs py.test for a particular project.""" if os.path.exists("requirements.txt"): session.install("-r", "requirements.txt") + if os.path.exists("requirements-test.txt"): + session.install("-r", "requirements-test.txt") + if post_install: post_install(session) @@ -169,50 +107,46 @@ def _session_tests(session, sample, post_install=None): ) -@nox.session(python="2.7") -@nox.parametrize("sample", PY2_ONLY_SAMPLES) -def gae(session, sample): - """Runs py.test for an App Engine standard sample.""" - - # Create a lib directory if needed, otherwise the App Engine vendor library - # will complain. - if not os.path.isdir(os.path.join(sample, "lib")): - os.mkdir(os.path.join(sample, "lib")) +@nox.session(python=ALL_VERSIONS) +def py(session): + """Runs py.test for a sample using the specified version of Python.""" + if session.python in TESTED_VERSIONS: + _session_tests(session) + else: + print("SKIPPED: {} tests are disabled for this sample.".format(session.python)) - _session_tests(session, sample, _setup_appengine_sdk) +# +# Readmegen +# -@nox.session(python=["3.6", "3.7"]) -@nox.parametrize("sample", NON_GAE_STANDARD_SAMPLES_PY3) -def py3(session, sample): - """Runs py.test for a sample using Python 3.x""" - _session_tests(session, sample) +def _get_repo_root(): + """ Returns the root folder of the project. """ + # Get root of this repository. Assume we don't have directories nested deeper than 10 items. + p = Path(os.getcwd()) + for i in range(10): + if p is None: + break + if Path(p / ".git").exists(): + return str(p) + p = p.parent + raise Exception("Unable to detect repository root.") -@nox.session(python="3.6") -def lint(session): - session.install("flake8", "flake8-import-order") - - local_names = _determine_local_import_names(".") - args = FLAKE8_COMMON_ARGS + [ - "--application-import-names", - ",".join(local_names), - ".", - ] - session.run("flake8", *args) - -SAMPLES_WITH_GENERATED_READMES = sorted(list(_collect_dirs(".", suffix=".rst.in"))) +GENERATED_READMES = sorted([x for x in Path(".").rglob("*.rst.in")]) @nox.session -@nox.parametrize("sample", SAMPLES_WITH_GENERATED_READMES) -def readmegen(session, sample): +@nox.parametrize("path", GENERATED_READMES) +def readmegen(session, path): """(Re-)generates the readme for a sample.""" session.install("jinja2", "pyyaml") - if os.path.exists(os.path.join(sample, "requirements.txt")): - session.install("-r", os.path.join(sample, "requirements.txt")) + if os.path.exists(os.path.join(path, "requirements.txt")): + session.install("-r", os.path.join(path, "requirements.txt")) - in_file = os.path.join(sample, "README.rst.in") - session.run("python", REPO_ROOT + "/scripts/readme-gen/readme_gen.py", in_file) + in_file = os.path.join(path, "README.rst.in") + session.run( + "python", _get_repo_root() + "/scripts/readme-gen/readme_gen.py", in_file + ) diff --git a/noxfile.py b/noxfile.py deleted file mode 100644 index f2698931fa92..000000000000 --- a/noxfile.py +++ /dev/null @@ -1,293 +0,0 @@ -# Copyright 2016 Google Inc. All Rights Reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -from __future__ import print_function - -import fnmatch -import os -import tempfile - -import nox - -try: - import ci_diff_helper -except ImportError: - ci_diff_helper = None - - -# -# Helpers and utility functions -# - - -def _list_files(folder, pattern): - """Lists all files below the given folder that match the pattern.""" - for root, folders, files in os.walk(folder): - for filename in files: - if fnmatch.fnmatch(filename, pattern): - yield os.path.join(root, filename) - - -def _collect_dirs( - start_dir, - blacklist=set(["conftest.py", "noxfile.py", "lib", "third_party"]), - suffix="_test.py", - recurse_further=False, -): - """Recursively collects a list of dirs that contain a file matching the - given suffix. - - This works by listing the contents of directories and finding - directories that have `*_test.py` files. - """ - # Collect all the directories that have tests in them. - for parent, subdirs, files in os.walk(start_dir): - if "./." in parent: - continue # Skip top-level dotfiles - elif any(f for f in files if f.endswith(suffix) and f not in blacklist): - # Don't recurse further for tests, since py.test will do that. - if not recurse_further: - del subdirs[:] - # This dir has desired files in it. yield it. - yield parent - else: - # Filter out dirs we don't want to recurse into - subdirs[:] = [s for s in subdirs if s[0].isalpha() and s not in blacklist] - - -def _get_changed_files(): - """Returns a list of files changed for this pull request / push. - - If running on a public CI like Travis or Circle this is used to only - run tests/lint for changed files. - """ - if not ci_diff_helper: - return None - - try: - config = ci_diff_helper.get_config() - except OSError: # Not on CI. - return None - - changed_files = ci_diff_helper.get_changed_files("HEAD", config.base) - - changed_files = set(["./{}".format(filename) for filename in changed_files]) - - return changed_files - - -def _filter_samples(sample_dirs, changed_files): - """Filers the list of sample directories to only include directories that - contain files in the list of changed files.""" - result = [] - for sample_dir in sample_dirs: - for changed_file in changed_files: - if changed_file.startswith(sample_dir): - result.append(sample_dir) - - return list(set(result)) - - -def _determine_local_import_names(start_dir): - """Determines all import names that should be considered "local". - - This is used when running the linter to insure that import order is - properly checked. - """ - file_ext_pairs = [os.path.splitext(path) for path in os.listdir(start_dir)] - return [ - basename - for basename, extension in file_ext_pairs - if extension == ".py" - or os.path.isdir(os.path.join(start_dir, basename)) - and basename not in ("__pycache__") - ] - - -# -# App Engine specific helpers -# - - -_GAE_ROOT = os.environ.get("GAE_ROOT") -if _GAE_ROOT is None: - _GAE_ROOT = tempfile.mkdtemp() - - -def _setup_appengine_sdk(session): - """Installs the App Engine SDK, if needed.""" - session.env["GAE_SDK_PATH"] = os.path.join(_GAE_ROOT, "google_appengine") - session.run("gcp-devrel-py-tools", "download-appengine-sdk", _GAE_ROOT) - - -# -# Test sessions -# - - -PYTEST_COMMON_ARGS = ["--junitxml=sponge_log.xml"] - -# Ignore I202 "Additional newline in a section of imports." to accommodate -# region tags in import blocks. Since we specify an explicit ignore, we also -# have to explicitly ignore the list of default ignores: -# `E121,E123,E126,E226,E24,E704,W503,W504` as shown by `flake8 --help`. -FLAKE8_COMMON_ARGS = [ - "--show-source", - "--builtin", - "gettext", - "--max-complexity", - "20", - "--import-order-style", - "google", - "--exclude", - ".nox,.cache,env,lib,generated_pb2,*_pb2.py,*_pb2_grpc.py", - "--ignore=E121,E123,E126,E226,E24,E704,W503,W504,I100,I201,I202", - "--max-line-length=88", -] - - -# Collect sample directories. -ALL_TESTED_SAMPLES = sorted(list(_collect_dirs("."))) -ALL_SAMPLE_DIRECTORIES = sorted( - list(_collect_dirs(".", suffix=".py", recurse_further=True)) -) -GAE_STANDARD_SAMPLES = [ - sample - for sample in ALL_TESTED_SAMPLES - if sample.startswith("./appengine/standard/") -] - -NON_GAE_STANDARD_SAMPLES_PY3 = sorted( - list(set(ALL_TESTED_SAMPLES) - set(GAE_STANDARD_SAMPLES)) -) - -# Filter sample directories if on a CI like Travis or Circle to only run tests -# for changed samples. -CHANGED_FILES = _get_changed_files() - -if CHANGED_FILES is not None: - print("Filtering based on changed files.") - ALL_TESTED_SAMPLES = _filter_samples(ALL_TESTED_SAMPLES, CHANGED_FILES) - ALL_SAMPLE_DIRECTORIES = _filter_samples(ALL_SAMPLE_DIRECTORIES, CHANGED_FILES) - GAE_STANDARD_SAMPLES = _filter_samples(GAE_STANDARD_SAMPLES, CHANGED_FILES) - NON_GAE_STANDARD_SAMPLES_PY3 = _filter_samples( - NON_GAE_STANDARD_SAMPLES_PY3, CHANGED_FILES - ) - -def _session_tests(session, sample, post_install=None): - """Runs py.test for a particular sample.""" - session.install("-r", "testing/requirements.txt") - - session.chdir(sample) - - if os.path.exists("requirements.txt"): - session.install("-r", "requirements.txt") - - if post_install: - post_install(session) - - session.run( - "pytest", - *(PYTEST_COMMON_ARGS + session.posargs), - # Pytest will return 5 when no tests are collected. This can happen - # on travis where slow and flaky tests are excluded. - # See http://doc.pytest.org/en/latest/_modules/_pytest/main.html - success_codes=[0, 5] - ) - - -@nox.session(python="2.7") -@nox.parametrize("sample", GAE_STANDARD_SAMPLES) -def gae(session, sample): - """Runs py.test for an App Engine standard sample.""" - - # Create a lib directory if needed, otherwise the App Engine vendor library - # will complain. - if not os.path.isdir(os.path.join(sample, "lib")): - os.mkdir(os.path.join(sample, "lib")) - - _session_tests(session, sample, _setup_appengine_sdk) - - -@nox.session(python="3.6") -@nox.parametrize("sample", NON_GAE_STANDARD_SAMPLES_PY3) -def py36(session, sample): - """Runs py.test for a sample using Python 3.6""" - _session_tests(session, sample) - - -@nox.session -@nox.parametrize("sample", ALL_SAMPLE_DIRECTORIES) -def lint(session, sample): - """Runs flake8 on the sample.""" - session.install("flake8", "flake8-import-order") - - local_names = _determine_local_import_names(sample) - args = FLAKE8_COMMON_ARGS + [ - "--application-import-names", - ",".join(local_names), - ".", - ] - - session.chdir(sample) - session.run("flake8", *args) - - -# -# Utility sessions -# - - -@nox.session -def missing_tests(session): - """Lists all sample directories that do not have tests.""" - print("The following samples do not have tests:") - for sample in set(ALL_SAMPLE_DIRECTORIES) - set(ALL_TESTED_SAMPLES): - print("* {}".format(sample)) - - -SAMPLES_WITH_GENERATED_READMES = sorted(list(_collect_dirs(".", suffix=".rst.in"))) - - -@nox.session -@nox.parametrize("sample", SAMPLES_WITH_GENERATED_READMES) -def readmegen(session, sample): - """(Re-)generates the readme for a sample.""" - session.install("jinja2", "pyyaml") - - if os.path.exists(os.path.join(sample, "requirements.txt")): - session.install("-r", os.path.join(sample, "requirements.txt")) - - in_file = os.path.join(sample, "README.rst.in") - session.run("python", "scripts/readme-gen/readme_gen.py", in_file) - - -@nox.session -def check_requirements(session): - """Checks for out of date requirements and optionally updates them. - - This is intentionally not parametric, as it's desired to never have two - samples with differing versions of dependencies. - """ - session.install("-r", "testing/requirements.txt") - - if "update" in session.posargs: - command = "update-requirements" - else: - command = "check-requirements" - - reqfiles = list(_list_files(".", "requirements*.txt")) - - for reqfile in reqfiles: - session.run("gcp-devrel-py-tools", command, reqfile) diff --git a/opencensus/requirements-test.txt b/opencensus/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/opencensus/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/profiler/appengine/flexible/requirements-test.txt b/profiler/appengine/flexible/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/profiler/appengine/flexible/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/profiler/appengine/standard_python37/requirements-test.txt b/profiler/appengine/standard_python37/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/profiler/appengine/standard_python37/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/profiler/quickstart/requirements-test.txt b/profiler/quickstart/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/profiler/quickstart/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/pubsub/cloud-client/requirements-test.txt b/pubsub/cloud-client/requirements-test.txt new file mode 100644 index 000000000000..c445bcb1aecf --- /dev/null +++ b/pubsub/cloud-client/requirements-test.txt @@ -0,0 +1,4 @@ +pytest==5.3.2 +gcp-devrel-py-tools==0.0.15 +mock==3.0.5 +google-cloud-core==1.3.0 diff --git a/pubsub/streaming-analytics/requirements-test.txt b/pubsub/streaming-analytics/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/pubsub/streaming-analytics/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/pytest.ini b/pytest.ini index abbe52a6b987..22ce71c1b7da 100644 --- a/pytest.ini +++ b/pytest.ini @@ -1,7 +1,6 @@ [pytest] addopts = -v - --no-success-flaky-report --tb=native norecursedirs = .git env lib .tox .nox junit_family = xunit2 diff --git a/run/hello-broken/requirements-test.txt b/run/hello-broken/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/run/hello-broken/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/run/image-processing/requirements-test.txt b/run/image-processing/requirements-test.txt new file mode 100644 index 000000000000..41c4d5110536 --- /dev/null +++ b/run/image-processing/requirements-test.txt @@ -0,0 +1,2 @@ +pytest==5.3.2 +mock==3.0.5 diff --git a/run/logging-manual/requirements-test.txt b/run/logging-manual/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/run/logging-manual/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/run/pubsub/requirements-test.txt b/run/pubsub/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/run/pubsub/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/run/system-package/requirements-test.txt b/run/system-package/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/run/system-package/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/scheduler/requirements-test.txt b/scheduler/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/scheduler/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/secretmanager/api-client/requirements-test.txt b/secretmanager/api-client/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/secretmanager/api-client/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/spanner/cloud-client/requirements-test.txt b/spanner/cloud-client/requirements-test.txt new file mode 100644 index 000000000000..41c4d5110536 --- /dev/null +++ b/spanner/cloud-client/requirements-test.txt @@ -0,0 +1,2 @@ +pytest==5.3.2 +mock==3.0.5 diff --git a/speech/cloud-client/requirements-test.txt b/speech/cloud-client/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/speech/cloud-client/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/speech/microphone/requirements-test.txt b/speech/microphone/requirements-test.txt new file mode 100644 index 000000000000..41c4d5110536 --- /dev/null +++ b/speech/microphone/requirements-test.txt @@ -0,0 +1,2 @@ +pytest==5.3.2 +mock==3.0.5 diff --git a/storage/api/requirements-test.txt b/storage/api/requirements-test.txt new file mode 100644 index 000000000000..1f10be83760a --- /dev/null +++ b/storage/api/requirements-test.txt @@ -0,0 +1,3 @@ +pytest==5.3.2 +gcp-devrel-py-tools==0.0.15 +flaky==3.6.1 diff --git a/storage/cloud-client/requirements-test.txt b/storage/cloud-client/requirements-test.txt new file mode 100644 index 000000000000..41c4d5110536 --- /dev/null +++ b/storage/cloud-client/requirements-test.txt @@ -0,0 +1,2 @@ +pytest==5.3.2 +mock==3.0.5 diff --git a/storage/s3-sdk/requirements-test.txt b/storage/s3-sdk/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/storage/s3-sdk/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/storage/signed_urls/requirements-test.txt b/storage/signed_urls/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/storage/signed_urls/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/storage/transfer_service/requirements-test.txt b/storage/transfer_service/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/storage/transfer_service/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/tables/automl/requirements-test.txt b/tables/automl/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/tables/automl/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/tasks/requirements-test.txt b/tasks/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/tasks/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/testing/requirements.txt b/testing/requirements.txt deleted file mode 100644 index e03068f58690..000000000000 --- a/testing/requirements.txt +++ /dev/null @@ -1,18 +0,0 @@ -beautifulsoup4==4.8.2 -coverage==5.0.4 -flaky==3.6.1 -funcsigs==1.0.2 -mock==3.0.5 -PyCrypto==2.6.1 -pytest-cov==2.8.1 -pytest==5.3.2; python_version > "3.0" -pytest==4.6.9; python_version < "3.0" -pyyaml==5.3.1 -responses==0.10.12 -WebTest==2.0.34 -webapp2==2.5.2 -google-api-python-client==1.7.11 -google-cloud-core==1.3.0 -gcp-devrel-py-tools==0.0.15 -flask==1.1.1 -websocket-client==0.56.0 diff --git a/texttospeech/cloud-client/requirements-test.txt b/texttospeech/cloud-client/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/texttospeech/cloud-client/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/trace/cloud-trace-demo-app/app/requirements-test.txt b/trace/cloud-trace-demo-app/app/requirements-test.txt new file mode 100644 index 000000000000..41c4d5110536 --- /dev/null +++ b/trace/cloud-trace-demo-app/app/requirements-test.txt @@ -0,0 +1,2 @@ +pytest==5.3.2 +mock==3.0.5 diff --git a/trace/trace-python-sample/requirements-test.txt b/trace/trace-python-sample/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/trace/trace-python-sample/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/translate/automl/requirements-test.txt b/translate/automl/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/translate/automl/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/translate/cloud-client/hybrid_glossaries/requirements-test.txt b/translate/cloud-client/hybrid_glossaries/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/translate/cloud-client/hybrid_glossaries/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/translate/cloud-client/requirements-test.txt b/translate/cloud-client/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/translate/cloud-client/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/video/cloud-client/analyze/requirements-test.txt b/video/cloud-client/analyze/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/video/cloud-client/analyze/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/video/cloud-client/labels/requirements-test.txt b/video/cloud-client/labels/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/video/cloud-client/labels/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/video/cloud-client/quickstart/requirements-test.txt b/video/cloud-client/quickstart/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/video/cloud-client/quickstart/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/video/cloud-client/shotchange/requirements-test.txt b/video/cloud-client/shotchange/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/video/cloud-client/shotchange/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/vision/automl/requirements-test.txt b/vision/automl/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/vision/automl/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/vision/cloud-client/crop_hints/requirements-test.txt b/vision/cloud-client/crop_hints/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/vision/cloud-client/crop_hints/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/vision/cloud-client/detect/requirements-test.txt b/vision/cloud-client/detect/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/vision/cloud-client/detect/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/vision/cloud-client/document_text/requirements-test.txt b/vision/cloud-client/document_text/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/vision/cloud-client/document_text/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/vision/cloud-client/face_detection/requirements-test.txt b/vision/cloud-client/face_detection/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/vision/cloud-client/face_detection/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/vision/cloud-client/product_search/requirements-test.txt b/vision/cloud-client/product_search/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/vision/cloud-client/product_search/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/vision/cloud-client/quickstart/requirements-test.txt b/vision/cloud-client/quickstart/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/vision/cloud-client/quickstart/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2 diff --git a/vision/cloud-client/web/requirements-test.txt b/vision/cloud-client/web/requirements-test.txt new file mode 100644 index 000000000000..781d4326c947 --- /dev/null +++ b/vision/cloud-client/web/requirements-test.txt @@ -0,0 +1 @@ +pytest==5.3.2