Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 21 additions & 9 deletions api_core/nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,14 @@


@nox.session
@nox.parametrize('py', ['2.7', '3.4', '3.5', '3.6'])
def unit(session, py):
"""Run the unit test suite."""

# Run unit tests against all supported versions of Python.
session.interpreter = 'python{}'.format(py)

# Set the virtualenv dirname.
session.virtualenv_dirname = 'unit-' + py
def default(session):
"""Default unit test session.

This is intended to be run **without** an interpreter set, so
that the current ``python`` (on the ``PATH``) or the version of
Python corresponding to the ``nox`` binary the ``PATH`` can
run the tests.
"""
# Install all test dependencies, then install this package in-place.
session.install(
'mock',
Expand All @@ -53,6 +51,20 @@ def unit(session, py):
)


@nox.session
@nox.parametrize('py', ['2.7', '3.4', '3.5', '3.6'])
def unit(session, py):
"""Run the unit test suite."""

# Run unit tests against all supported versions of Python.
session.interpreter = 'python{}'.format(py)

# Set the virtualenv dirname.
session.virtualenv_dirname = 'unit-' + py

default(session)


@nox.session
def lint(session):
"""Run linters.
Expand Down
45 changes: 21 additions & 24 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,7 @@ environment:
# iterations.

- PYTHON: "C:\\Python27"
NOX_ENV: "unit(py='2.7')"

- PYTHON: "C:\\Python35-x64"
NOX_ENV: "unit(py='3.5')"

install:
- cmd: echo "Filesystem root:"
Expand Down Expand Up @@ -51,24 +48,24 @@ install:

test_script:
# Run the project tests
- "%PYTHON%\\Scripts\\nox.exe -f api_core\\nox.py -s %NOX_ENV%"
- "%PYTHON%\\Scripts\\nox.exe -f bigquery\\nox.py -s %NOX_ENV%"
- "%PYTHON%\\Scripts\\nox.exe -f bigtable\\nox.py -s %NOX_ENV%"
- "%PYTHON%\\Scripts\\nox.exe -f core\\nox.py -s %NOX_ENV%"
- "%PYTHON%\\Scripts\\nox.exe -f datastore\\nox.py -s %NOX_ENV%"
- "%PYTHON%\\Scripts\\nox.exe -f dns\\nox.py -s %NOX_ENV%"
- "%PYTHON%\\Scripts\\nox.exe -f error_reporting\\nox.py -s %NOX_ENV%"
- "%PYTHON%\\Scripts\\nox.exe -f firestore\\nox.py -s %NOX_ENV%"
- "%PYTHON%\\Scripts\\nox.exe -f language\\nox.py -s %NOX_ENV%"
- "%PYTHON%\\Scripts\\nox.exe -f logging\\nox.py -s %NOX_ENV%"
- "%PYTHON%\\Scripts\\nox.exe -f monitoring\\nox.py -s %NOX_ENV%"
- "%PYTHON%\\Scripts\\nox.exe -f pubsub\\nox.py -s %NOX_ENV%"
- "%PYTHON%\\Scripts\\nox.exe -f resource_manager\\nox.py -s %NOX_ENV%"
- "%PYTHON%\\Scripts\\nox.exe -f runtimeconfig\\nox.py -s %NOX_ENV%"
- "%PYTHON%\\Scripts\\nox.exe -f spanner\\nox.py -s %NOX_ENV%"
- "%PYTHON%\\Scripts\\nox.exe -f speech\\nox.py -s %NOX_ENV%"
- "%PYTHON%\\Scripts\\nox.exe -f storage\\nox.py -s %NOX_ENV%"
- "%PYTHON%\\Scripts\\nox.exe -f trace\\nox.py -s %NOX_ENV%"
- "%PYTHON%\\Scripts\\nox.exe -f translate\\nox.py -s %NOX_ENV%"
- "%PYTHON%\\Scripts\\nox.exe -f videointelligence\\nox.py -s %NOX_ENV%"
- "%PYTHON%\\Scripts\\nox.exe -f vision\\nox.py -s %NOX_ENV%"
- "%PYTHON%\\Scripts\\nox.exe -f api_core\\nox.py -s default"
- "%PYTHON%\\Scripts\\nox.exe -f bigquery\\nox.py -s default"
- "%PYTHON%\\Scripts\\nox.exe -f bigtable\\nox.py -s default"
- "%PYTHON%\\Scripts\\nox.exe -f core\\nox.py -s default"
- "%PYTHON%\\Scripts\\nox.exe -f datastore\\nox.py -s default"
- "%PYTHON%\\Scripts\\nox.exe -f dns\\nox.py -s default"
- "%PYTHON%\\Scripts\\nox.exe -f error_reporting\\nox.py -s default"
- "%PYTHON%\\Scripts\\nox.exe -f firestore\\nox.py -s default"
- "%PYTHON%\\Scripts\\nox.exe -f language\\nox.py -s default"
- "%PYTHON%\\Scripts\\nox.exe -f logging\\nox.py -s default"
- "%PYTHON%\\Scripts\\nox.exe -f monitoring\\nox.py -s default"
- "%PYTHON%\\Scripts\\nox.exe -f pubsub\\nox.py -s default"
- "%PYTHON%\\Scripts\\nox.exe -f resource_manager\\nox.py -s default"
- "%PYTHON%\\Scripts\\nox.exe -f runtimeconfig\\nox.py -s default"
- "%PYTHON%\\Scripts\\nox.exe -f spanner\\nox.py -s default"
- "%PYTHON%\\Scripts\\nox.exe -f speech\\nox.py -s default"
- "%PYTHON%\\Scripts\\nox.exe -f storage\\nox.py -s default"
- "%PYTHON%\\Scripts\\nox.exe -f trace\\nox.py -s default"
- "%PYTHON%\\Scripts\\nox.exe -f translate\\nox.py -s default"
- "%PYTHON%\\Scripts\\nox.exe -f videointelligence\\nox.py -s default"
- "%PYTHON%\\Scripts\\nox.exe -f vision\\nox.py -s default"
30 changes: 21 additions & 9 deletions bigquery/nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,14 @@


@nox.session
@nox.parametrize('py', ['2.7', '3.4', '3.5', '3.6'])
def unit(session, py):
"""Run the unit test suite."""

# Run unit tests against all supported versions of Python.
session.interpreter = 'python{}'.format(py)

# Set the virtualenv dirname.
session.virtualenv_dirname = 'unit-' + py
def default(session):
"""Default unit test session.

This is intended to be run **without** an interpreter set, so
that the current ``python`` (on the ``PATH``) or the version of
Python corresponding to the ``nox`` binary the ``PATH`` can
run the tests.
"""
# Install all test dependencies, then install this package in-place.
session.install('mock', 'pytest', 'pytest-cov', *LOCAL_DEPS)
session.install('-e', '.')
Expand All @@ -55,6 +53,20 @@ def unit(session, py):
)


@nox.session
@nox.parametrize('py', ['2.7', '3.4', '3.5', '3.6'])
def unit(session, py):
"""Run the unit test suite."""

# Run unit tests against all supported versions of Python.
session.interpreter = 'python{}'.format(py)

# Set the virtualenv dirname.
session.virtualenv_dirname = 'unit-' + py

default(session)


@nox.session
@nox.parametrize('py', ['2.7', '3.6'])
def system(session, py):
Expand Down
30 changes: 21 additions & 9 deletions bigtable/nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,14 @@


@nox.session
@nox.parametrize('py', ['2.7', '3.4', '3.5', '3.6'])
def unit(session, py):
"""Run the unit test suite."""

# Run unit tests against all supported versions of Python.
session.interpreter = 'python{}'.format(py)

# Set the virtualenv dirname.
session.virtualenv_dirname = 'unit-' + py
def default(session):
"""Default unit test session.

This is intended to be run **without** an interpreter set, so
that the current ``python`` (on the ``PATH``) or the version of
Python corresponding to the ``nox`` binary the ``PATH`` can
run the tests.
"""
# Install all test dependencies, then install this package in-place.
session.install('mock', 'pytest', 'pytest-cov', *LOCAL_DEPS)
session.install('-e', '.')
Expand All @@ -54,6 +52,20 @@ def unit(session, py):
)


@nox.session
@nox.parametrize('py', ['2.7', '3.4', '3.5', '3.6'])
def unit(session, py):
"""Run the unit test suite."""

# Run unit tests against all supported versions of Python.
session.interpreter = 'python{}'.format(py)

# Set the virtualenv dirname.
session.virtualenv_dirname = 'unit-' + py

default(session)


@nox.session
@nox.parametrize('py', ['2.7', '3.6'])
def system(session, py):
Expand Down
30 changes: 21 additions & 9 deletions core/nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,14 @@


@nox.session
@nox.parametrize('py', ['2.7', '3.4', '3.5', '3.6'])
def unit(session, py):
"""Run the unit test suite."""

# Run unit tests against all supported versions of Python.
session.interpreter = 'python{}'.format(py)

# Set the virtualenv dirname.
session.virtualenv_dirname = 'unit-' + py
def default(session):
"""Default unit test session.

This is intended to be run **without** an interpreter set, so
that the current ``python`` (on the ``PATH``) or the version of
Python corresponding to the ``nox`` binary the ``PATH`` can
run the tests.
"""
# Install all test dependencies, then install this package in-place.
session.install(
'mock',
Expand All @@ -59,6 +57,20 @@ def unit(session, py):
)


@nox.session
@nox.parametrize('py', ['2.7', '3.4', '3.5', '3.6'])
def unit(session, py):
"""Run the unit test suite."""

# Run unit tests against all supported versions of Python.
session.interpreter = 'python{}'.format(py)

# Set the virtualenv dirname.
session.virtualenv_dirname = 'unit-' + py

default(session)


@nox.session
def lint(session):
"""Run linters.
Expand Down
30 changes: 21 additions & 9 deletions datastore/nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,14 @@


@nox.session
@nox.parametrize('py', ['2.7', '3.4', '3.5', '3.6'])
def unit(session, py):
"""Run the unit test suite."""

# Run unit tests against all supported versions of Python.
session.interpreter = 'python{}'.format(py)

# Set the virtualenv dirname.
session.virtualenv_dirname = 'unit-' + py
def default(session):
"""Default unit test session.

This is intended to be run **without** an interpreter set, so
that the current ``python`` (on the ``PATH``) or the version of
Python corresponding to the ``nox`` binary the ``PATH`` can
run the tests.
"""
# Install all test dependencies, then install this package in-place.
session.install('mock', 'pytest', 'pytest-cov', *LOCAL_DEPS)
session.install('-e', '.')
Expand All @@ -55,6 +53,20 @@ def unit(session, py):
)


@nox.session
@nox.parametrize('py', ['2.7', '3.4', '3.5', '3.6'])
def unit(session, py):
"""Run the unit test suite."""

# Run unit tests against all supported versions of Python.
session.interpreter = 'python{}'.format(py)

# Set the virtualenv dirname.
session.virtualenv_dirname = 'unit-' + py

default(session)


@nox.session
@nox.parametrize('py', ['2.7', '3.6'])
def system(session, py):
Expand Down
38 changes: 28 additions & 10 deletions dns/nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,33 @@
)


@nox.session
def default(session):
"""Default unit test session.

This is intended to be run **without** an interpreter set, so
that the current ``python`` (on the ``PATH``) or the version of
Python corresponding to the ``nox`` binary the ``PATH`` can
run the tests.
"""
# Install all test dependencies, then install this package in-place.
session.install('mock', 'pytest', 'pytest-cov', *LOCAL_DEPS)
session.install('-e', '.')

# Run py.test against the unit tests.
session.run(
'py.test',
'--quiet',
'--cov=google.cloud.dns',
'--cov=tests.unit',
'--cov-append',
'--cov-config=.coveragerc',
'--cov-report=',
'--cov-fail-under=97',
'tests/unit',
)


@nox.session
@nox.parametrize('py', ['2.7', '3.4', '3.5', '3.6'])
def unit(session, py):
Expand All @@ -36,16 +63,7 @@ def unit(session, py):
# Set the virtualenv dirname.
session.virtualenv_dirname = 'unit-' + py

# Install all test dependencies, then install this package in-place.
session.install('mock', 'pytest', 'pytest-cov', *LOCAL_DEPS)
session.install('-e', '.')

# Run py.test against the unit tests.
session.run('py.test', '--quiet',
'--cov=google.cloud.dns', '--cov=tests.unit', '--cov-append',
'--cov-config=.coveragerc', '--cov-report=', '--cov-fail-under=97',
'tests/unit',
)
default(session)


@nox.session
Expand Down
38 changes: 28 additions & 10 deletions error_reporting/nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,33 @@
)


@nox.session
def default(session):
"""Default unit test session.

This is intended to be run **without** an interpreter set, so
that the current ``python`` (on the ``PATH``) or the version of
Python corresponding to the ``nox`` binary the ``PATH`` can
run the tests.
"""
# Install all test dependencies, then install this package in-place.
session.install('mock', 'pytest', 'pytest-cov', *LOCAL_DEPS)
session.install('-e', '.')

# Run py.test against the unit tests.
session.run(
'py.test',
'--quiet',
'--cov=google.cloud.error_reporting',
'--cov=tests.unit',
'--cov-append',
'--cov-config=.coveragerc',
'--cov-report=',
'--cov-fail-under=97',
'tests/unit',
)


@nox.session
@nox.parametrize('py', ['2.7', '3.4', '3.5', '3.6'])
def unit(session, py):
Expand All @@ -37,16 +64,7 @@ def unit(session, py):
# Set the virtualenv dirname.
session.virtualenv_dirname = 'unit-' + py

# Install all test dependencies, then install this package in-place.
session.install('mock', 'pytest', 'pytest-cov', *LOCAL_DEPS)
session.install('-e', '.')

# Run py.test against the unit tests.
session.run(
'py.test', '--quiet', '--cov=google.cloud.error_reporting',
'--cov=tests.unit', '--cov-append', '--cov-config=.coveragerc',
'--cov-report=', '--cov-fail-under=97', 'tests/unit',
)
default(session)


@nox.session
Expand Down
Loading