37
37
38
38
TEST_CONFIG = {
39
39
# You can opt out from the test for specific Python versions.
40
- 'ignored_versions' : ["2.7" ],
41
-
40
+ "ignored_versions" : ["2.7" ],
42
41
# An envvar key for determining the project id to use. Change it
43
42
# to 'BUILD_SPECIFIC_GCLOUD_PROJECT' if you want to opt in using a
44
43
# build specific Cloud project. You can also use your own string
45
44
# to use your own Cloud project.
46
- ' gcloud_project_env' : ' GOOGLE_CLOUD_PROJECT' ,
45
+ " gcloud_project_env" : " GOOGLE_CLOUD_PROJECT" ,
47
46
# 'gcloud_project_env': 'BUILD_SPECIFIC_GCLOUD_PROJECT',
48
-
49
47
# A dictionary you want to inject into your test. Don't put any
50
48
# secrets here. These values will override predefined values.
51
- ' envs' : {},
49
+ " envs" : {},
52
50
}
53
51
54
52
55
53
try :
56
54
# Ensure we can import noxfile_config in the project's directory.
57
- sys .path .append ('.' )
55
+ sys .path .append ("." )
58
56
from noxfile_config import TEST_CONFIG_OVERRIDE
59
57
except ImportError as e :
60
58
print ("No user noxfile_config found: detail: {}" .format (e ))
@@ -69,12 +67,12 @@ def get_pytest_env_vars():
69
67
ret = {}
70
68
71
69
# Override the GCLOUD_PROJECT and the alias.
72
- env_key = TEST_CONFIG [' gcloud_project_env' ]
70
+ env_key = TEST_CONFIG [" gcloud_project_env" ]
73
71
# 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 ]
75
73
76
74
# Apply user supplied envs.
77
- ret .update (TEST_CONFIG [' envs' ])
75
+ ret .update (TEST_CONFIG [" envs" ])
78
76
return ret
79
77
80
78
@@ -83,7 +81,7 @@ def get_pytest_env_vars():
83
81
ALL_VERSIONS = ["2.7" , "3.6" , "3.7" , "3.8" ]
84
82
85
83
# Any default versions that should be ignored.
86
- IGNORED_VERSIONS = TEST_CONFIG [' ignored_versions' ]
84
+ IGNORED_VERSIONS = TEST_CONFIG [" ignored_versions" ]
87
85
88
86
TESTED_VERSIONS = sorted ([v for v in ALL_VERSIONS if v not in IGNORED_VERSIONS ])
89
87
@@ -138,7 +136,7 @@ def lint(session):
138
136
args = FLAKE8_COMMON_ARGS + [
139
137
"--application-import-names" ,
140
138
"," .join (local_names ),
141
- "."
139
+ "." ,
142
140
]
143
141
session .run ("flake8" , * args )
144
142
@@ -182,9 +180,9 @@ def py(session):
182
180
if session .python in TESTED_VERSIONS :
183
181
_session_tests (session )
184
182
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
+ )
188
186
189
187
190
188
#
0 commit comments