From: Harmon Date: Wed, 16 Oct 2019 16:56:25 +0000 (-0500) Subject: Add documentation for running tests X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=0aa7310bc88321248628f4f9acb5fa5f46cfbcf0;p=tweepy.git Add documentation for running tests Resolves #681 --- diff --git a/docs/index.rst b/docs/index.rst index 1c83919..1daa4f9 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -18,6 +18,7 @@ Contents: extended_tweets.rst streaming_how_to.rst api.rst + running_tests.rst Indices and tables ================== diff --git a/docs/running_tests.rst b/docs/running_tests.rst new file mode 100644 index 0000000..3131751 --- /dev/null +++ b/docs/running_tests.rst @@ -0,0 +1,29 @@ +.. _running_tests: + +************* +Running Tests +************* + +These steps outline how to run tests for Tweepy: + +1. Download Tweepy's source code to a directory. + +2. Install from the downloaded source with the ``test`` extra, e.g. + ``pip install .[test]``. Optionally install the ``dev`` extra as well, for + ``tox`` and ``coverage``, e.g. ``pip install .[dev,test]``. + +3. Run ``python setup.py nosetests`` or simply ``nosetests`` in the source + directory. With the ``dev`` extra, coverage will be shown, and ``tox`` can + also be run to test different Python versions. + +To record new cassettes, the following environment variables can be used: + +``TWITTER_USERNAME`` +``CONSUMER_KEY`` +``CONSUMER_SECRET`` +``ACCESS_KEY`` +``ACCESS_SECRET`` +``USE_REPLAY`` + +Simply set ``USE_REPLAY`` to ``False`` and provide the app and account +credentials and username.