Lines Matching +full:python +full:- +full:tests
11 …/kubernetes/community/blob/master/contributors/guide/pull-requests.md#best-practices-for-faster-re…
21 - The feature must be documented in both the API and narrative
24 - The feature must work fully on the following CPython versions:
27 - The feature must not add unnecessary dependencies (where
37 - While logged into your GitHub account, navigate to the
38 ``google-api-python-client`` `repo`_ on GitHub.
40 - Fork and clone the ``google-api-python-client`` repository to your GitHub account by
43 - Clone your fork of ``google-api-python-client`` from your GitHub account to your local
45 as ``hack-on-google-api-python-client``. E.g.::
48 $ git clone git@github.com:USERNAME/google-api-python-client.git hack-on-google-api-python-client
49 $ cd hack-on-google-api-python-client
50 # Configure remotes such that you can pull changes from the googleapis/google-api-python-client
52 $ git remote add upstream git@github.com:googleapis/google-api-python-client.git
60 To work on the codebase and run the tests, we recommend using ``nox``,
63 .. _repo: https://github.com/googleapis/google-api-python-client
68 We use `nox <https://nox.readthedocs.io/en/latest/>`__ to instrument our tests.
70 - To test your changes, run unit tests with ``nox``::
71 $ nox -s unit
73 - To run a single unit test::
75 $ nox -s unit-3.10 -- -k <name of test>
80 The unit tests and system tests are described in the
89 If the error mentions ``Python.h`` not being found,
90 install ``python-dev`` and try again.
93 $ sudo apt-get install python-dev
98 - We use the automatic code formatter ``black``. You can run it using
101 $ nox -s blacken
103 - PEP8 compliance is required, with exceptions defined in the linter configuration.
105 any non-compliant code via::
107 $ nox -s lint
109 - In order to make ``nox -s lint`` run faster, you can set some environment
115 By doing this, you are specifying the location of the most up-to-date
116 version of ``google-api-python-client``. The
120 - This repository contains configuration for the
121 `pre-commit <https://pre-commit.com/>`__ tool, which automates checking
125 .. code-block:: bash
127 $ pre-commit install
128 pre-commit installed at .git/hooks/pre-commit
132 - Many unit tests use a helper method, ``_call_fut`` ("FUT" is short for
133 "Function-Under-Test"), which is PEP8-incompliant, but more readable.
134 Some also use a local variable, ``MUT`` (short for "Module-Under-Test").
137 Running System Tests
140 - To run system tests, you can execute::
142 # Run all system tests
143 $ nox -s system
146 $ nox -s system-3.8 -- -k <name of test>
151 System tests are only configured to run under Python 3.8.
152 For expediency, we do not run them in older versions of Python 3.
154 This alone will not run the tests. You'll need to change some local
156 run all the tests.
158 - System tests will be run against an actual project. You should use local credentials from gcloud …
164 - The codebase *must* have 100% test statement coverage after each commit.
165 You can test coverage via ``nox -s cover``.
178 $ nox -s docs
185 provide more examples, but make sure to write tests for those examples.
191 The tests will run against a real Google Cloud Project, so you should
192 configure them just like the System Tests.
194 - To run sample tests, you can execute::
196 # Run all tests in a folder
198 $ nox -s py-3.8
202 $ nox -s py-3.8 -- -k <name of test>
212 ``https://github.com/googleapis/google-api-python-client/blob/main/CONTRIBUTING.rst``)
215 .. _description on PyPI: https://pypi.org/project/google-api-python-client
219 Supported Python Versions
224 - `Python 3.6`_
225 - `Python 3.7`_
226 - `Python 3.8`_
227 - `Python 3.9`_
228 - `Python 3.10`_
230 .. _Python 3.6: https://docs.python.org/3.6/
231 .. _Python 3.7: https://docs.python.org/3.7/
232 .. _Python 3.8: https://docs.python.org/3.8/
233 .. _Python 3.9: https://docs.python.org/3.9/
234 .. _Python 3.10: https://docs.python.org/3.10/
239 .. _config: https://github.com/googleapis/google-api-python-client/blob/main/noxfile.py
242 We also explicitly decided to support Python 3 beginning with version 3.6.
245 - Encouraging use of newest versions of Python 3
246 - Taking the lead of `prominent`_ open-source `projects`_
247 - `Unicode literal support`_ which allows for a cleaner codebase that
248 works in both Python 2 and Python 3
250 …inent: https://docs.djangoproject.com/en/1.9/faq/install/#what-python-version-can-i-use-with-django
252 .. _Unicode literal support: https://www.python.org/dev/peps/pep-0414/
273 - **If you are an individual writing original source code** and **you own the
275 `individual CLA <https://developers.google.com/open-source/cla/individual>`__.
276 - **If you work for a company that wants to allow you to contribute your work**,
278 `corporate CLA <https://developers.google.com/open-source/cla/corporate>`__.