Skip to content

Commit

Permalink
Merge a160683 into a0970ac
Browse files Browse the repository at this point in the history
  • Loading branch information
Kasulejoseph committed Nov 14, 2019
2 parents a0970ac + a160683 commit 78893de
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 5 deletions.
1 change: 1 addition & 0 deletions .coverage
@@ -0,0 +1 @@
!coverage.py: This is a private format, don't read it directly!{"lines":{"/Users/kasule/Desktop/ug_dst/rwalocation/main.py":[4,6,7,9,10,15,19,24,27,37,11,12,13]}}
2 changes: 2 additions & 0 deletions .coveragerc
@@ -0,0 +1,2 @@
[run]
omit = rwalocation/*__init__.py*
2 changes: 2 additions & 0 deletions .coveralls.yml
@@ -0,0 +1,2 @@
service_name: travis-pro
repo_token: hNQRU4lW5bJspVgvbN5ED9c3jfNrmFMNw
13 changes: 13 additions & 0 deletions .travis.yml
@@ -0,0 +1,13 @@
language: python

python:
- "3.6"

install:
- pip install -r requirements.txt
- pip install coveralls

script: coverage run --source rwalocation rwalocation/main.py

after_success:
coveralls
2 changes: 1 addition & 1 deletion rwalocation/main.py
@@ -1,7 +1,7 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

__version__ = "1.0"
__version__ = "1.1"

import requests
import operator
Expand Down
22 changes: 18 additions & 4 deletions tests/test_project.py
Expand Up @@ -2,12 +2,26 @@
# -*- coding: utf-8 -*-

import unittest
import ug-dst
from rwalocation.main import Province


class UnitTests(unittest.TestCase):
def setUp(self):
self.location = Province()

def test_import(self):
self.assertIsNotNone(ug-dst)
self.assertIsNotNone(self.location)

def test_list_districts(self):
self.assertIsInstance(self.location.district(), list)

def test_list_province_not_zero(self):
self.assertNotEqual(len(self.location.province()), 0)

def test_list_province_return_list(self):
self.assertIsInstance(self.location.province(), list)

def test_sort_by_district_return_an_array(self):
self.assertIsInstance(self.location.sort_by_district(), list)

def test_project(self):
self.assertTrue(False, "write more tests here")

0 comments on commit 78893de

Please sign in to comment.