From 0aa7310bc88321248628f4f9acb5fa5f46cfbcf0 Mon Sep 17 00:00:00 2001 From: Harmon Date: Wed, 16 Oct 2019 11:56:25 -0500 Subject: [PATCH] Add documentation for running tests Resolves #681 --- docs/index.rst | 1 + docs/running_tests.rst | 29 +++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) create mode 100644 docs/running_tests.rst 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. -- 2.25.1