From 26558bae8976a985d73c2d98c31d8612273f907d Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Fri, 25 Jun 2021 11:20:12 -0400 Subject: [PATCH] chore(python): simplify nox steps in CONTRIBUTING.rst (#1135) This is a follow up to PR #1132 based on feedback from https://github.com/googleapis/python-bigquery-sqlalchemy/pull/191 to simplify the steps to run `nox` in [CONTRIBUTING.rst](https://github.com/googleapis/synthtool/blob/master/synthtool/gcp/templates/python_library/CONTRIBUTING.rst). --- .../gcp/templates/python_library/CONTRIBUTING.rst | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/synthtool/gcp/templates/python_library/CONTRIBUTING.rst b/synthtool/gcp/templates/python_library/CONTRIBUTING.rst index 2392e849b..873870c39 100644 --- a/synthtool/gcp/templates/python_library/CONTRIBUTING.rst +++ b/synthtool/gcp/templates/python_library/CONTRIBUTING.rst @@ -73,12 +73,9 @@ Using ``nox`` We use `nox `__ to instrument our tests. - To test your changes, run unit tests with ``nox``:: -{% for v in unit_test_python_versions %} - $ nox -s unit-{{ v }} -{%- endfor %} + $ nox -s unit -- Args to pytest can be passed through the nox command separated by a `--`. For - example, to run a single test:: +- To run a single unit test:: $ nox -s unit-{{ unit_test_python_versions | last }} -- -k @@ -148,9 +145,7 @@ Running System Tests - To run system tests, you can execute:: # Run all system tests -{%- for system_test_version in system_test_python_versions %} - $ nox -s system-{{ system_test_version }} -{%- endfor %} + $ nox -s system # Run a single system test $ nox -s system-{{ system_test_python_versions | last}} -- -k