3737
3838TEST_CONFIG = {
3939 # You can opt out from the test for specific Python versions.
40- 'ignored_versions' : ["2.7" ],
41-
40+ "ignored_versions" : ["2.7" ],
4241 # An envvar key for determining the project id to use. Change it
4342 # to 'BUILD_SPECIFIC_GCLOUD_PROJECT' if you want to opt in using a
4443 # build specific Cloud project. You can also use your own string
4544 # to use your own Cloud project.
46- ' gcloud_project_env' : ' GOOGLE_CLOUD_PROJECT' ,
45+ " gcloud_project_env" : " GOOGLE_CLOUD_PROJECT" ,
4746 # 'gcloud_project_env': 'BUILD_SPECIFIC_GCLOUD_PROJECT',
48-
4947 # A dictionary you want to inject into your test. Don't put any
5048 # secrets here. These values will override predefined values.
51- ' envs' : {},
49+ " envs" : {},
5250}
5351
5452
5553try :
5654 # Ensure we can import noxfile_config in the project's directory.
57- sys .path .append ('.' )
55+ sys .path .append ("." )
5856 from noxfile_config import TEST_CONFIG_OVERRIDE
5957except ImportError as e :
6058 print ("No user noxfile_config found: detail: {}" .format (e ))
@@ -69,12 +67,12 @@ def get_pytest_env_vars():
6967 ret = {}
7068
7169 # Override the GCLOUD_PROJECT and the alias.
72- env_key = TEST_CONFIG [' gcloud_project_env' ]
70+ env_key = TEST_CONFIG [" gcloud_project_env" ]
7371 # This should error out if not set.
74- ret [' GOOGLE_CLOUD_PROJECT' ] = os .environ [env_key ]
72+ ret [" GOOGLE_CLOUD_PROJECT" ] = os .environ [env_key ]
7573
7674 # Apply user supplied envs.
77- ret .update (TEST_CONFIG [' envs' ])
75+ ret .update (TEST_CONFIG [" envs" ])
7876 return ret
7977
8078
@@ -83,7 +81,7 @@ def get_pytest_env_vars():
8381ALL_VERSIONS = ["2.7" , "3.6" , "3.7" , "3.8" ]
8482
8583# Any default versions that should be ignored.
86- IGNORED_VERSIONS = TEST_CONFIG [' ignored_versions' ]
84+ IGNORED_VERSIONS = TEST_CONFIG [" ignored_versions" ]
8785
8886TESTED_VERSIONS = sorted ([v for v in ALL_VERSIONS if v not in IGNORED_VERSIONS ])
8987
@@ -138,7 +136,7 @@ def lint(session):
138136 args = FLAKE8_COMMON_ARGS + [
139137 "--application-import-names" ,
140138 "," .join (local_names ),
141- "."
139+ "." ,
142140 ]
143141 session .run ("flake8" , * args )
144142
@@ -182,9 +180,9 @@ def py(session):
182180 if session .python in TESTED_VERSIONS :
183181 _session_tests (session )
184182 else :
185- session .skip ("SKIPPED: {} tests are disabled for this sample." . format (
186- session .python
187- ))
183+ session .skip (
184+ "SKIPPED: {} tests are disabled for this sample." . format ( session .python )
185+ )
188186
189187
190188#
0 commit comments