Skip to content

Commit

Permalink
Fixing nox travis session. (#290)
Browse files Browse the repository at this point in the history
Change-Id: Ie431ad392f7c5aa5a8789b53e5d798c10d04295e
  • Loading branch information
Jon Wayne Parrott committed Apr 27, 2016
1 parent bb3f101 commit 08752a3
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
19 changes: 13 additions & 6 deletions nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
'-x', '--no-success-flaky-report', '--cov', '--cov-config',
'.coveragerc', '--cov-append', '--cov-report=']

SESSION_TESTS_BLACKLIST = set(('appengine', 'testing'))
# Speech is temporarily disabled.
SESSION_TESTS_BLACKLIST = set(('appengine', 'testing', 'speech'))


def session_lint(session):
Expand Down Expand Up @@ -121,9 +122,15 @@ def session_gae(session, extra_pytest_args=None):
success_codes=[0, 5]) # Treat no test collected as success.


def session_travis(session):
@nox.parametrize('subsession', ['gae', 'tests'])
def session_travis(session, subsession):
"""On travis, just run with python3.4 and don't run slow or flaky tests."""
session_tests(
session, 'python3.4', extra_pytest_args=['-m not slow and not flaky'])
session_gae(
session, extra_pytest_args=['-m not slow and not flaky'])
if subsession == 'tests':
session_tests(
session,
'python3.4',
extra_pytest_args=['-m not slow and not flaky'])
else:
session_gae(
session,
extra_pytest_args=['-m not slow and not flaky'])
2 changes: 2 additions & 0 deletions storage/api/customer_supplied_keys_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@
import re

from customer_supplied_keys import main
from gcp.testing.flaky import flaky


@flaky
def test_main(cloud_config, capsys):
main(cloud_config.storage_bucket, __file__)
out, err = capsys.readouterr()
Expand Down

0 comments on commit 08752a3

Please sign in to comment.