3737
3838TEST_CONFIG = {
3939 # You can opt out from the test for specific Python versions.
40- "ignored_versions" : ["2.7" ],
40+ 'ignored_versions' : ["2.7" ],
41+
4142 # An envvar key for determining the project id to use. Change it
4243 # to 'BUILD_SPECIFIC_GCLOUD_PROJECT' if you want to opt in using a
4344 # build specific Cloud project. You can also use your own string
4445 # to use your own Cloud project.
45- " gcloud_project_env" : " GOOGLE_CLOUD_PROJECT" ,
46+ ' gcloud_project_env' : ' GOOGLE_CLOUD_PROJECT' ,
4647 # 'gcloud_project_env': 'BUILD_SPECIFIC_GCLOUD_PROJECT',
48+
4749 # A dictionary you want to inject into your test. Don't put any
4850 # secrets here. These values will override predefined values.
49- " envs" : {},
51+ ' envs' : {},
5052}
5153
5254
5355try :
5456 # Ensure we can import noxfile_config in the project's directory.
55- sys .path .append ("." )
57+ sys .path .append ('.' )
5658 from noxfile_config import TEST_CONFIG_OVERRIDE
5759except ImportError as e :
5860 print ("No user noxfile_config found: detail: {}" .format (e ))
@@ -67,12 +69,12 @@ def get_pytest_env_vars():
6769 ret = {}
6870
6971 # Override the GCLOUD_PROJECT and the alias.
70- env_key = TEST_CONFIG [" gcloud_project_env" ]
72+ env_key = TEST_CONFIG [' gcloud_project_env' ]
7173 # This should error out if not set.
72- ret [" GOOGLE_CLOUD_PROJECT" ] = os .environ [env_key ]
74+ ret [' GOOGLE_CLOUD_PROJECT' ] = os .environ [env_key ]
7375
7476 # Apply user supplied envs.
75- ret .update (TEST_CONFIG [" envs" ])
77+ ret .update (TEST_CONFIG [' envs' ])
7678 return ret
7779
7880
@@ -81,7 +83,7 @@ def get_pytest_env_vars():
8183ALL_VERSIONS = ["2.7" , "3.6" , "3.7" , "3.8" ]
8284
8385# Any default versions that should be ignored.
84- IGNORED_VERSIONS = TEST_CONFIG [" ignored_versions" ]
86+ IGNORED_VERSIONS = TEST_CONFIG [' ignored_versions' ]
8587
8688TESTED_VERSIONS = sorted ([v for v in ALL_VERSIONS if v not in IGNORED_VERSIONS ])
8789
@@ -136,7 +138,7 @@ def lint(session):
136138 args = FLAKE8_COMMON_ARGS + [
137139 "--application-import-names" ,
138140 "," .join (local_names ),
139- "." ,
141+ "."
140142 ]
141143 session .run ("flake8" , * args )
142144
@@ -180,9 +182,9 @@ def py(session):
180182 if session .python in TESTED_VERSIONS :
181183 _session_tests (session )
182184 else :
183- session .skip (
184- "SKIPPED: {} tests are disabled for this sample." . format ( session .python )
185- )
185+ session .skip ("SKIPPED: {} tests are disabled for this sample." . format (
186+ session .python
187+ ))
186188
187189
188190#
0 commit comments