Skip to content

Commit 789ba72

Browse files
Merge pull request #38 from Nullifiers/feature/unittests
Setup testing suite
2 parents 8fb3ca8 + 90615fb commit 789ba72

File tree

3 files changed

+28
-0
lines changed

3 files changed

+28
-0
lines changed

.travis.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
language: python
2+
python:
3+
- "3.6"
4+
5+
# command to install dependencies
6+
install:
7+
- pip install -r requirements.txt
8+
9+
# command to run tests
10+
script:
11+
python -m unittest tests/*

requirements.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
requests==2.22.0
2+
ConfigArgParse==0.15.1
3+
progress==1.5

tests/test_crawler.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import unittest
2+
from hsc import crawler
3+
4+
class TestCrawler(unittest.TestCase):
5+
6+
def setUp(self):
7+
self.crawler_obj = crawler.Crawler()
8+
9+
def test_crawler_obj_is_not_none(self):
10+
self.assertIsNotNone(self.crawler_obj)
11+
12+
13+
if __name__ == '__main__':
14+
unittest.main()

0 commit comments

Comments
 (0)