Add documentation for running tests
authorHarmon <Harmon758@gmail.com>
Wed, 16 Oct 2019 16:56:25 +0000 (11:56 -0500)
committerHarmon <Harmon758@gmail.com>
Wed, 16 Oct 2019 16:56:25 +0000 (11:56 -0500)
Resolves #681

docs/index.rst
docs/running_tests.rst [new file with mode: 0644]

index 1c83919df1c8f8770dc2136f76c3ce6348bb0060..1daa4f917fa0d526f5174acbaa41fb50a23ac791 100644 (file)
@@ -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 (file)
index 0000000..3131751
--- /dev/null
@@ -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.