diff options
author | Christopher Wilcox <git@crwilcox.com> | 2018-04-08 16:42:49 -0700 |
---|---|---|
committer | Jon Wayne Parrott <jonwayne@google.com> | 2018-04-08 16:42:49 -0700 |
commit | b9b97974c6d2d1ade1d1d1d7a6b7496b2e61f5ca (patch) | |
tree | c929c35dc8e6ea9d334295bee12e7d192e3a3414 | |
parent | 7bab7ae1d2b416aeda3ecac8e94d1636e972407f (diff) | |
download | urllib3-b9b97974c6d2d1ade1d1d1d7a6b7496b2e61f5ca.tar.gz |
clarify how to setup a virtual env and run a small number of tests (#1360)
-rw-r--r-- | Makefile | 5 | ||||
-rw-r--r-- | docs/contributing.rst | 19 |
2 files changed, 23 insertions, 1 deletions
@@ -43,6 +43,11 @@ clean: test: requirements tox +.PHONY: test-quick +test-quick: requirements + tox -e py36 + tox -e py27 + .PHONY: test-all test-all: requirements tox diff --git a/docs/contributing.rst b/docs/contributing.rst index 8196dbb5..206f640f 100644 --- a/docs/contributing.rst +++ b/docs/contributing.rst @@ -17,6 +17,18 @@ If you wish to add a new feature or fix a bug: :) Make sure to add yourself to ``CONTRIBUTORS.txt``. +Setting up your development environment +--------------------------------------- + +It is recommended, and even enforced by the make file, that you use a +`virtualenv +<http://docs.python-guide.org/en/latest/dev/virtualenvs/>`_:: + + $ python3 -m venv venv3 + $ source venv3/bin/activate + $ pip install -r dev-requirements.txt + + Running the tests ----------------- @@ -25,12 +37,17 @@ analysis while running test suite. Our ``Makefile`` handles much of this for you as long as you're running it `inside of a virtualenv <http://docs.python-guide.org/en/latest/dev/virtualenvs/>`_:: - $ make test + $ make test-quick [... magically installs dependencies and runs tests on your virtualenv] Ran 182 tests in 1.633s OK (SKIP=6) +There is also a make target for running all of our tests and multiple python +versions. + + $ make test-all + Note that code coverage less than 100% is regarded as a failing run. Some platform-specific tests are skipped unless run in that platform. To make sure the code works in all of urllib3's supported platforms, you can run our ``tox`` |