From f8e8b857901fe2decb7cdce5ffa339bd12a1292f Mon Sep 17 00:00:00 2001 From: Josh Peak Date: Fri, 28 Jun 2019 13:29:55 +1000 Subject: [PATCH] Address testing with tox on windows documentation --- docs/contributing.rst | 5 ++++- runtests.sh | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/docs/contributing.rst b/docs/contributing.rst index 63865a6..a2de992 100644 --- a/docs/contributing.rst +++ b/docs/contributing.rst @@ -11,7 +11,10 @@ yourself using `py.test `__ and all environments VCR.py supports. The test suite is pretty big and slow, but you can tell tox to only run specific tests like this:: - tox -e py27requests -- -v -k "'test_status_code or test_gzip'" + tox -e {pyNN}-{HTTP_LIBRARY} -- + + tox -e py27-requests -- -v -k "'test_status_code or test_gzip'" + tox -e py37-requests -- -v --last-failed This will run only tests that look like ``test_status_code`` or ``test_gzip`` in the test suite, and only in the python 2.7 environment diff --git a/runtests.sh b/runtests.sh index d6718bc..99cc970 100755 --- a/runtests.sh +++ b/runtests.sh @@ -1,3 +1,7 @@ #!/bin/bash +# https://blog.ionelmc.ro/2015/04/14/tox-tricks-and-patterns/#when-it-inevitably-leads-to-shell-scripts +# If you are getting an INVOCATION ERROR for this script then there is +# a good chance you are running on Windows. +# You can and should use WSL for running tox on Windows when it calls bash scripts. REQUESTS_CA_BUNDLE=`python -m pytest_httpbin.certs` py.test $*