8000 Don't treat notestscollected as an error · mitake/python-docs-samples@527c5f5 · GitHub
[go: up one dir, main page]

Skip to content

Commit 527c5f5

Browse files
author
Jon Wayne Parrott
committed
Don't treat notestscollected as an error
Change-Id: I76d576c6676b446aff5172622ae863219ad6fddb
1 parent 67353b0 commit 527c5f5

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

nox.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,13 @@ def _session_tests(session, sample):
184184
if os.path.exists(os.path.join(sample, 'requirements.txt')):
185185
session.install('-r', 'requirements.txt')
186186

187-
session.run('pytest', *(PYTEST_COMMON_ARGS + session.posargs))
187+
session.run(
188+
6459 'pytest',
189+
*(PYTEST_COMMON_ARGS + session.posargs),
190+
# Pytest will return 5 when no tests are collected. This can happen
191+
# on travis where slow and flaky tests are excluded.
192+
# See http://doc.pytest.org/en/latest/_modules/_pytest/main.html
193+
success_codes=[0, 5])
188194

189195

190196
@nox.parametrize('sample', GAE_STANDARD_SAMPLES)

0 commit comments

Comments
 (0)
0