Skip to content

Commit

Permalink
Merge branch 'testing' of github.com:josuebrunel/myql into testing
Browse files Browse the repository at this point in the history
  • Loading branch information
josuebrunel committed Oct 8, 2015
2 parents 2414cd1 + 8031c61 commit f0c4095
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 12 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ python:
- pypy3
install:
- pip install -r requirements.txt
- pip install coverage coveralls
- pip install coverage coveralls pytest
script:
- coverage run --source=myql -m unittest discover
- coverage run --source=myql -m pytest -v tests/tests.py
env:
global:
secure: hXpkZqclyUXMX586jS4BtJmYsrszVr/jWbMiLWLOZ2z7n5LK9INziKkOqYu0JTBskAHVEmhxJ7oNOD9gI/06btLO5NLBONN3qtsHq4UruCo0Zlx2BgaDfR5FqnrVqk+fMbLCbzWgo0wShM4o8jTGy7l22xqhhYAsuubmayqEfPk=
before_install:
- openssl aes-256-cbc -K $encrypted_60f42691f4f2_key -iv $encrypted_60f42691f4f2_iv
-in credentials.json.enc -out credentials.json -d
after_success:
- coverage report
- coverage report -m
- coveralls
8 changes: 4 additions & 4 deletions run_tests.sh
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
if [ ! -z $1 ]; then
TestCase=".${1}"
TestCase="::${1}"
else
TestCase=''
fi

if [ ! -z $2 ]; then
Test=".${2}"
Test="::${2}"
else
Test=''
fi

coverage run --source=myql -m unittest tests$TestCase$Test
coverage report
coverage run --source=myql -m pytest -vs tests/tests.py$TestCase$Test
coverage report -m
coverage html
7 changes: 5 additions & 2 deletions tests/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,8 +375,11 @@ def test_yahoo_fantasy_sport(self,):
return False

data = response.json()
current_team = data['query']['results']['team']
print(current_team['team_id'],current_team['name'],current_team['number_of_trades'],current_team['number_of_moves'])
try:
current_team = data['query']['results']['team']
print(current_team['team_id'],current_team['name'],current_team['number_of_trades'],current_team['number_of_moves'])
except (Exception,) as e:
print(e)


class TestWeather(unittest.TestCase):
Expand Down
6 changes: 3 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ deps=
-rrequirements.txt
pytest
coverage
commands=
-py.test -v tests/tests.py
-coverage report
commands=
- coverage run --source=myql/ -m pytest -v tests/tests.py
- coverage report -m

0 comments on commit f0c4095

Please sign in to comment.