Running Tests¶
These steps outline how to run tests for Tweepy:
- Download Tweepy’s source code to a directory.
- Install from the downloaded source with the
test
extra, e.g.pip install .[test]
. Optionally install thedev
extra as well, fortox
andcoverage
, e.g.pip install .[dev,test]
. - Run
python setup.py nosetests
or simplynosetests
in the source directory. With thedev
extra, coverage will be shown, andtox
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.