Skip to content

Commit 3298f05

Browse files
author
Jon Wayne Parrott
committed
Fix app engine nox sessions
1 parent f09c019 commit 3298f05

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

nox.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ def _setup_appengine_sdk(session):
171171
NON_GAE_STANDARD_SAMPLES, CHANGED_FILES)
172172

173173

174-
def _session_tests(session, sample):
174+
def _session_tests(session, sample, post_install):
175175
"""Runs py.test for a particular sample."""
176176
session.install('-r', 'testing/requirements.txt')
177177

@@ -180,6 +180,9 @@ def _session_tests(session, sample):
180180
if os.path.exists(os.path.join(sample, 'requirements.txt')):
181181
session.install('-r', 'requirements.txt')
182182

183+
if post_install:
184+
post_install(session)
185+
183186
session.run(
184187
'pytest',
185188
*(PYTEST_COMMON_ARGS + session.posargs),
@@ -193,14 +196,13 @@ def _session_tests(session, sample):
193196
def session_gae(session, sample):
194197
"""Runs py.test for an App Engine standard sample."""
195198
session.interpreter = 'python2.7'
196-
_setup_appengine_sdk(session)
197199

198200
# Create a lib directory if needed, otherwise the App Engine vendor library
199201
# will complain.
200202
if not os.path.isdir(os.path.join(sample, 'lib')):
201203
os.mkdir(os.path.join(sample, 'lib'))
202204

203-
_session_tests(session, sample)
205+
_session_tests(session, sample, _setup_appengine_sdk)
204206

205207

206208
@nox.parametrize('sample', NON_GAE_STANDARD_SAMPLES)

0 commit comments

Comments
 (0)