Skip to content

Commit

Permalink
added travis-ci tests and azure-pipelines fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Álvaro Bartolomé del Canto committed Aug 16, 2019
1 parent c0a2ae7 commit 3858771
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 28 deletions.
21 changes: 21 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
language: python

python:
- "3.5"
- "3.6"
- "3.7"

dist: xenial

install:
- pip install -r requirements.txt
- pip install twipper==0.1
- pip install pytest==4.5.0
- pip install codecov==2.0.15
- pip install pytest-cov==2.7.1

script:
- pytest --cov-report term --cov=twipper tests/

after_success:
- coveralls
5 changes: 2 additions & 3 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,8 @@ steps:
displayName: 'Install dependencies'

- script: |
pip install pytest pytest-azurepipelines pytest-cov coveralls
pytest --cov=investpy/
coveralls
pip install pytest pytest-azurepipelines
pytest
env:
consumer_key: $(consumer_key)
consumer_secret: $(consumer_secret)
Expand Down
50 changes: 25 additions & 25 deletions tests/test_twipper.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@


def test_twipper():
credentials = Twipper(consumer_key='cpFGICwRz8P7NPnJC95jqgCa6',
consumer_secret='C4GhEz16wNd2F6I7k0S887lOBtqnraVAR0yc2PEBoz6GesYqXb',
access_token='254490342-E6nbxVQg4Wmx93mQNrHWQXnJfr4G5eStTPX8sF00',
access_token_secret='sUXFZa2nnEAoss9rgqAyrCGV0NF6qL55Xh4Rc42qiyfEe')
credentials = Twipper(consumer_key=os.environ['consumer_key'],
consumer_secret=os.environ['consumer_secret'],
access_token=os.environ['access_token'],
access_token_secret=os.environ['access_token_secret'])

credentials.plan = 'fullarchive'
credentials.label = 'research'
Expand All @@ -32,27 +32,27 @@ def test_twipper():
result_type='mixed',
count=10)

# batch.search_user_tweets(access=credentials,
# screen_name='realDonaldTrump',
# page_count=1,
# filter_retweets=True,
# language='en',
# result_type='mixed',
# count=10)
#
# stream.stream_tweets(access=credentials,
# query='futbol',
# language='es',
# filter_retweets=False,
# tweet_limit=10,
# retry='no_limit')
#
# stream.stream_country_tweets(access=credentials,
# country='spain',
# language='es',
# filter_retweets=False,
# tweet_limit=10,
# retry='no_limit')
batch.search_user_tweets(access=credentials,
screen_name='realDonaldTrump',
page_count=1,
filter_retweets=True,
language='en',
result_type='mixed',
count=10)

stream.stream_tweets(access=credentials,
query='futbol',
language='es',
filter_retweets=False,
tweet_limit=10,
retry='no_limit')

stream.stream_country_tweets(access=credentials,
country='spain',
language='es',
filter_retweets=False,
tweet_limit=10,
retry='no_limit')

# premium.search_tweets(access=credentials,
# query='futbol',
Expand Down

0 comments on commit 3858771

Please sign in to comment.