Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup Travis CI_resolved #98

Merged
merged 9 commits into from
Mar 29, 2020
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
language: python
python:
- "3.6"
cache: pip
install:
- pip install -r requirements.txt
before_script:
- flake8 .
script:
- python test_googleMapsApiModule.py
athityakumar marked this conversation as resolved.
Show resolved Hide resolved
9 changes: 7 additions & 2 deletions test_googleMapsApiModule.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
import config
import pytest
from googlemaps.exceptions import ApiError
import unittest


class TestClass:
class TestClass(unittest.TestCase):
vishakha-lall marked this conversation as resolved.
Show resolved Hide resolved
def test_direction_with_valid_input(self):
result = googleMapsApiModule.direction('paris','brussels')
assert result == "https://www.google.com/maps/dir/?api=1&origin=paris&destination=brussels"
Expand Down Expand Up @@ -33,4 +35,7 @@ def test_elevation_with_valid_input(self):
def test_elevation_with_invalid_input(self):
with pytest.raises(IndexError):
result = googleMapsApiModule.elevation('hihih')
assert type(result) is float
assert type(result) is float

if __name__ == '__main__':
unittest.main()