테스트 하기¶
다음은 Tweepy에서 어떻게 테스트를 진행할 수 있는가에 대한 대략적인 설명입니다.
Tweepy 소스코드를 다운로드합니다.
다운로드한 소스코드를
test의 추가 정보를 사용, 설치하세요. (예시:pip install .[test]) 추가적으로tox와coverage의 사용이 필요하다면dev추가 정보와 같이 설치해주세요. (예시:pip install .[dev,test])Run tests (e.g.
python -m unittest discover tests) in the source directory. With thedevextra, coverage can be measured by usingcoverage run(e.g.coverage run -m unittest discover tests) andtoxcan be run to test different Python versions.
새 카세트를 기록하기 위해서는, 아래 환경 변수들을 사용할 수 있어야 합니다:
TWITTER_USERNAME
BEARER_TOKEN
CONSUMER_KEY
CONSUMER_SECRET
ACCESS_KEY
ACCESS_SECRET
USE_REPLAY
간단하게 USE_REPLAY 를 False 로 설정하고, 앱, 계정 자격 증명, 사용자 이름을 제공해도 됩니다.