Skip to content

Commit 54b5a61

Browse files
committed
setup travis
1 parent b2efd34 commit 54b5a61

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed

.travis.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
language: python
2+
python:
3+
- "3.6"
4+
# command to install dependencies
5+
install: "pip install PyYAML"
6+
# command to run tests
7+
script: "pytest tests.py"

tests.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import unittest
2+
3+
import yaml
4+
5+
6+
class TestAPIRegistry(unittest.TestCase):
7+
def test_api_list(self):
8+
with open("./API_LIST.yml") as in_f:
9+
api_d = yaml.load(in_f)
10+
self.assertTrue("APIs" in api_d)
11+
api_li = api_d["APIs"]
12+
for api in api_li:
13+
self.assertTrue("metadata" in api)
14+
15+
if __name__ == '__main__':
16+
unittest.main()

0 commit comments

Comments
 (0)