mirror of
https://github.com/kevin1024/vcrpy.git
synced 2025-12-08 16:53:23 +00:00
Remove tox reference from contributing docs
This commit is contained in:
@@ -83,39 +83,21 @@ The PR reviewer is a second set of eyes to see if:
|
||||
Running VCR's test suite
|
||||
------------------------
|
||||
|
||||
The tests are all run automatically on `Travis
|
||||
CI <https://travis-ci.org/kevin1024/vcrpy>`__, but you can also run them
|
||||
yourself using `pytest <http://pytest.org/>`__ and
|
||||
`Tox <http://tox.testrun.org/>`__.
|
||||
The tests are all run automatically on `Github Actions CI <https://github.com/kevin1024/vcrpy/actions>`__,
|
||||
but you can also run them yourself using `pytest <http://pytest.org/>`__.
|
||||
|
||||
Tox will automatically run them in all environments VCR.py supports if they are available on your `PATH`. Alternatively you can use `tox-pyenv <https://pypi.org/project/tox-pyenv/>`_ with
|
||||
`pyenv <https://github.com/pyenv/pyenv>`_.
|
||||
We recommend you read the documentation for each and see the section further below.
|
||||
|
||||
The test suite is pretty big and slow, but you can tell tox to only run specific tests like this::
|
||||
|
||||
tox -e {pyNN}-{HTTP_LIBRARY} -- <pytest flags passed through>
|
||||
|
||||
tox -e py38-requests -- -v -k "'test_status_code or test_gzip'"
|
||||
tox -e py38-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 3.8 environment
|
||||
that has ``requests`` installed.
|
||||
|
||||
Also, in order for the boto3 tests to run, you will need an AWS key.
|
||||
In order for the boto3 tests to run, you will need an AWS key.
|
||||
Refer to the `boto3
|
||||
documentation <https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/index.html>`__
|
||||
for how to set this up. I have marked the boto3 tests as optional in
|
||||
Travis so you don't have to worry about them failing if you submit a
|
||||
pull request.
|
||||
|
||||
Using PyEnv with VCR's test suite
|
||||
Using Pyenv with VCR's test suite
|
||||
---------------------------------
|
||||
|
||||
PyEnv is a tool for managing multiple installation of python on your system.
|
||||
Pyenv is a tool for managing multiple installation of python on your system.
|
||||
See the full documentation at their `github <https://github.com/pyenv/pyenv>`_
|
||||
but we are also going to use `tox-pyenv <https://pypi.org/project/tox-pyenv/>`_
|
||||
in this example::
|
||||
|
||||
git clone https://github.com/pyenv/pyenv ~/.pyenv
|
||||
@@ -126,26 +108,21 @@ in this example::
|
||||
# Setup shim paths
|
||||
eval "$(pyenv init -)"
|
||||
|
||||
# Setup your local system tox tooling
|
||||
pip3 install tox tox-pyenv
|
||||
|
||||
# Install supported versions (at time of writing), this does not activate them
|
||||
pyenv install 3.8.0 pypy3.8
|
||||
pyenv install 3.12.0 pypy3.10
|
||||
|
||||
# This activates them
|
||||
pyenv local 3.8.0 pypy3.8
|
||||
pyenv local 3.12.0 pypy3.10
|
||||
|
||||
# Run the whole test suite
|
||||
tox
|
||||
|
||||
# Run the whole test suite or just part of it
|
||||
tox -e py38-requests
|
||||
pip install .[test]
|
||||
./run_tests.sh
|
||||
|
||||
|
||||
Troubleshooting on MacOSX
|
||||
-------------------------
|
||||
|
||||
If you have this kind of error when running tox :
|
||||
If you have this kind of error when running tests :
|
||||
|
||||
.. code:: python
|
||||
|
||||
|
||||
Reference in New Issue
Block a user