Skip to content

Commit

Permalink
Merge 2cb85b4 into a0970ac
Browse files Browse the repository at this point in the history
  • Loading branch information
Kasulejoseph committed Nov 14, 2019
2 parents a0970ac + 2cb85b4 commit 07d89f2
Show file tree
Hide file tree
Showing 7 changed files with 38 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
1 change: 1 addition & 0 deletions README.md
@@ -1,4 +1,5 @@
# Rwalocation
[![Coverage Status](https://coveralls.io/repos/github/Kasulejoseph/Ahantu/badge.svg?branch=tests)](https://coveralls.io/github/Kasulejoseph/Ahantu?branch=tests)
> A Python library for listing locations in Rwanda
```
Expand Down
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 07d89f2

Please sign in to comment.