Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closes #4319 - shorten test names #4321

Merged
merged 2 commits into from
Nov 1, 2017
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
10 changes: 5 additions & 5 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ We use `nox`_ to instrument our tests.

- To test your changes, run unit tests with ``nox``::

$ nox -f datastore/nox.py -s "unit_tests(python_version='2.7')"
$ nox -f datastore/nox.py -s "unit_tests(python_version='3.4')"
$ nox -f datastore/nox.py -s "unit(py='2.7')"
$ nox -f datastore/nox.py -s "unit(py='3.4')"
$ ...

.. note::
Expand All @@ -118,7 +118,7 @@ We use `nox`_ to instrument our tests.

$ export GIT_ROOT=$(pwd)
$ cd ${GIT_ROOT}/datastore/
$ nox -s "unit_tests(python_version='3.6')"
$ nox -s "unit(py='3.6')"

.. nox: https://pypi.org/project/nox-automation/

Expand Down Expand Up @@ -184,8 +184,8 @@ Running System Tests

- To run system tests for a given package, you can execute::

$ nox -f datastore/nox.py -s "system_tests(python_version='3.6')"
$ nox -f datastore/nox.py -s "system_tests(python_version='2.7')"
$ nox -f datastore/nox.py -s "system(py='3.6')"
$ nox -f datastore/nox.py -s "system(py='2.7')"

.. note::

Expand Down
8 changes: 4 additions & 4 deletions api_core/nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@


@nox.session
@nox.parametrize('python_version', ['2.7', '3.4', '3.5', '3.6'])
def unit_tests(session, python_version):
@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(python_version)
session.interpreter = 'python{}'.format(py)

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

# Install all test dependencies, then install this package in-place.
session.install(
Expand Down
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ environment:
# iterations.

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

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

install:
- cmd: echo "Filesystem root:"
Expand Down
24 changes: 12 additions & 12 deletions bigquery/nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@


@nox.session
@nox.parametrize('python_version', ['2.7', '3.4', '3.5', '3.6'])
def unit_tests(session, python_version):
@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(python_version)
session.interpreter = 'python{}'.format(py)

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

# Install all test dependencies, then install this package in-place.
session.install('mock', 'pytest', 'pytest-cov', *LOCAL_DEPS)
Expand All @@ -56,19 +56,19 @@ def unit_tests(session, python_version):


@nox.session
@nox.parametrize('python_version', ['2.7', '3.6'])
def system_tests(session, python_version):
@nox.parametrize('py', ['2.7', '3.6'])
def system(session, py):
"""Run the system test suite."""

# Sanity check: Only run system tests if the environment variable is set.
if not os.environ.get('GOOGLE_APPLICATION_CREDENTIALS', ''):
session.skip('Credentials must be set via environment variable.')

# Run the system tests against latest Python 2 and Python 3 only.
session.interpreter = 'python{}'.format(python_version)
session.interpreter = 'python{}'.format(py)

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

# Install all test dependencies, then install this package into the
# virtualenv's dist-packages.
Expand All @@ -89,19 +89,19 @@ def system_tests(session, python_version):


@nox.session
@nox.parametrize('python_version', ['2.7', '3.6'])
def snippets_tests(session, python_version):
@nox.parametrize('py', ['2.7', '3.6'])
def snippets_tests(session, py):
"""Run the system test suite."""

# Sanity check: Only run system tests if the environment variable is set.
if not os.environ.get('GOOGLE_APPLICATION_CREDENTIALS', ''):
session.skip('Credentials must be set via environment variable.')

# Run the system tests against latest Python 2 and Python 3 only.
session.interpreter = 'python{}'.format(python_version)
session.interpreter = 'python{}'.format(py)

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

# Install all test dependencies, then install this package into the
# virtualenv's dist-packages.
Expand Down
16 changes: 8 additions & 8 deletions bigtable/nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,15 @@


@nox.session
@nox.parametrize('python_version', ['2.7', '3.4', '3.5', '3.6'])
def unit_tests(session, python_version):
@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(python_version)
session.interpreter = 'python{}'.format(py)

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

# Install all test dependencies, then install this package in-place.
session.install('mock', 'pytest', 'pytest-cov', *LOCAL_DEPS)
Expand All @@ -55,19 +55,19 @@ def unit_tests(session, python_version):


@nox.session
@nox.parametrize('python_version', ['2.7', '3.6'])
def system_tests(session, python_version):
@nox.parametrize('py', ['2.7', '3.6'])
def system(session, py):
"""Run the system test suite."""

# Sanity check: Only run system tests if the environment variable is set.
if not os.environ.get('GOOGLE_APPLICATION_CREDENTIALS', ''):
session.skip('Credentials must be set via environment variable.')

# Run the system tests against latest Python 2 and Python 3 only.
session.interpreter = 'python{}'.format(python_version)
session.interpreter = 'python{}'.format(py)

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

# Install all test dependencies, then install this package into the
# virtualenv's dist-packages.
Expand Down
8 changes: 4 additions & 4 deletions core/nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@


@nox.session
@nox.parametrize('python_version', ['2.7', '3.4', '3.5', '3.6'])
def unit_tests(session, python_version):
@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(python_version)
session.interpreter = 'python{}'.format(py)

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

# Install all test dependencies, then install this package in-place.
session.install(
Expand Down
16 changes: 8 additions & 8 deletions datastore/nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@


@nox.session
@nox.parametrize('python_version', ['2.7', '3.4', '3.5', '3.6'])
def unit_tests(session, python_version):
@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(python_version)
session.interpreter = 'python{}'.format(py)

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

# Install all test dependencies, then install this package in-place.
session.install('mock', 'pytest', 'pytest-cov', *LOCAL_DEPS)
Expand All @@ -56,19 +56,19 @@ def unit_tests(session, python_version):


@nox.session
@nox.parametrize('python_version', ['2.7', '3.6'])
def system_tests(session, python_version):
@nox.parametrize('py', ['2.7', '3.6'])
def system(session, py):
"""Run the system test suite."""

# Sanity check: Only run system tests if the environment variable is set.
if not os.environ.get('GOOGLE_APPLICATION_CREDENTIALS', ''):
session.skip('Credentials must be set via environment variable.')

# Run the system tests against latest Python 2 and Python 3 only.
session.interpreter = 'python{}'.format(python_version)
session.interpreter = 'python{}'.format(py)

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

# Install all test dependencies, then install this package into the
# virtualenv's dist-packages.
Expand Down
8 changes: 4 additions & 4 deletions dns/nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@


@nox.session
@nox.parametrize('python_version', ['2.7', '3.4', '3.5', '3.6'])
def unit_tests(session, python_version):
@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(python_version)
session.interpreter = 'python{}'.format(py)

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

# Install all test dependencies, then install this package in-place.
session.install('mock', 'pytest', 'pytest-cov', *LOCAL_DEPS)
Expand Down
16 changes: 8 additions & 8 deletions error_reporting/nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@


@nox.session
@nox.parametrize('python_version', ['2.7', '3.4', '3.5', '3.6'])
def unit_tests(session, python_version):
@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(python_version)
session.interpreter = 'python{}'.format(py)

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

# Install all test dependencies, then install this package in-place.
session.install('mock', 'pytest', 'pytest-cov', *LOCAL_DEPS)
Expand Down Expand Up @@ -83,19 +83,19 @@ def lint_setup_py(session):


@nox.session
@nox.parametrize('python_version', ['2.7', '3.6'])
def system_tests(session, python_version):
@nox.parametrize('py', ['2.7', '3.6'])
def system(session, py):
"""Run the system test suite."""

# Sanity check: Only run system tests if the environment variable is set.
if not os.environ.get('GOOGLE_APPLICATION_CREDENTIALS', ''):
session.skip('Credentials must be set via environment variable.')

# Run the system tests against latest Python 2 and Python 3 only.
session.interpreter = 'python{}'.format(python_version)
session.interpreter = 'python{}'.format(py)

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

# Install all test dependencies, then install this package into the
# virtualenv's dist-packages.
Expand Down
16 changes: 8 additions & 8 deletions firestore/nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,15 @@


@nox.session
@nox.parametrize('python_version', ['2.7', '3.4', '3.5', '3.6'])
def unit_tests(session, python_version):
@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(python_version)
session.interpreter = 'python{}'.format(py)

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

# Install all test dependencies, then install this package in-place.
session.install('mock', 'pytest', 'pytest-cov', *LOCAL_DEPS)
Expand All @@ -58,18 +58,18 @@ def unit_tests(session, python_version):


@nox.session
@nox.parametrize('python_version', ['2.7', '3.6'])
def system_tests(session, python_version):
@nox.parametrize('py', ['2.7', '3.6'])
def system(session, py):
"""Run the system test suite."""
# Sanity check: Only run system tests if the environment variable is set.
if not os.environ.get('FIRESTORE_APPLICATION_CREDENTIALS'):
session.skip('Credentials must be set via environment variable.')

# Run the system tests against latest Python 2 and Python 3 only.
session.interpreter = 'python{}'.format(python_version)
session.interpreter = 'python{}'.format(py)

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

# Install all test dependencies, then install this package into the
# virtualenv's dist-packages.
Expand Down
16 changes: 8 additions & 8 deletions language/nox.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@


@nox.session
@nox.parametrize('python_version', ['2.7', '3.4', '3.5', '3.6'])
def unit_tests(session, python_version):
@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(python_version)
session.interpreter = 'python{}'.format(py)

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

# Install all test dependencies, then install this package in-place.
session.install('mock', 'pytest', 'pytest-cov', *LOCAL_DEPS)
Expand All @@ -52,19 +52,19 @@ def unit_tests(session, python_version):


@nox.session
@nox.parametrize('python_version', ['2.7', '3.6'])
def system_tests(session, python_version):
@nox.parametrize('py', ['2.7', '3.6'])
def system(session, py):
"""Run the system test suite."""

# Sanity check: Only run system tests if the environment variable is set.
if not os.environ.get('GOOGLE_APPLICATION_CREDENTIALS', ''):
session.skip('Credentials must be set via environment variable.')

# Run the system tests against latest Python 2 and Python 3 only.
session.interpreter = 'python{}'.format(python_version)
session.interpreter = 'python{}'.format(py)

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

# Install all test dependencies, then install this package into the
# virtualenv's dist-packages.
Expand Down
Loading