@@ -171,7 +171,7 @@ def _setup_appengine_sdk(session):
171
171
NON_GAE_STANDARD_SAMPLES , CHANGED_FILES )
172
172
173
173
174
- def _session_tests (session , sample ):
174
+ def _session_tests (session , sample , post_install ):
175
175
"""Runs py.test for a particular sample."""
176
176
session .install ('-r' , 'testing/requirements.txt' )
177
177
@@ -180,6 +180,9 @@ def _session_tests(session, sample):
180
180
if os .path .exists (os .path .join (sample , 'requirements.txt' )):
181
181
session .install ('-r' , 'requirements.txt' )
182
182
183
+ if post_install :
184
+ post_install (session )
185
+
183
186
session .run (
184
187
'pytest' ,
185
188
* (PYTEST_COMMON_ARGS + session .posargs ),
@@ -193,14 +196,13 @@ def _session_tests(session, sample):
193
196
def session_gae (session , sample ):
194
197
"""Runs py.test for an App Engine standard sample."""
195
198
session .interpreter = 'python2.7'
196
- _setup_appengine_sdk (session )
197
199
198
200
# Create a lib directory if needed, otherwise the App Engine vendor library
199
201
# will complain.
200
202
if not os .path .isdir (os .path .join (sample , 'lib' )):
201
203
os .mkdir (os .path .join (sample , 'lib' ))
202
204
203
- _session_tests (session , sample )
205
+ _session_tests (session , sample , _setup_appengine_sdk )
204
206
205
207
206
208
@nox .parametrize ('sample' , NON_GAE_STANDARD_SAMPLES )
0 commit comments