Skip to content

Commit 9804c20

Browse files
author
Takashi Matsuo
committed
use session.skip
1 parent 488c0aa commit 9804c20

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

noxfile-template.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,9 @@ def py(session):
181181
if session.python in TESTED_VERSIONS:
182182
_session_tests(session)
183183
else:
184-
print("SKIPPED: {} tests are disabled for this sample.".format(session.python))
184+
session.skip("SKIPPED: {} tests are disabled for this sample.".format(
185+
session.python
186+
))
185187

186188

187189
#
@@ -192,7 +194,7 @@ def py(session):
192194
def cloud_run(session):
193195
"""Run tests for cloud run."""
194196
if 'cloud_run' not in TEST_CONFIG['opt_in_sessions']:
195-
print('SKIPPED: cloud_run tests are disabled for this sample.')
197+
session.skip('SKIPPED: cloud_run tests are disabled for this sample.')
196198
return
197199

198200
if os.path.exists("requirements.txt"):

0 commit comments

Comments
 (0)