Skip to content

Commit 0084b5b

Browse files
Merge pull request #84 from kgashok/master
Refactored to match pytest good practices setup
2 parents a19f0b2 + 18ebff6 commit 0084b5b

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ language: python
22
python:
33
- "3.6"
44
script:
5-
- pytest test/tests.py
5+
- pytest

test/tests.py renamed to tests/test_basics.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
import os,sys
1+
import os
2+
import sys
23
relpath = os.path.dirname(__file__) # Find relative path: from current directory to test.py
34
abspath = os.path.abspath(".") # Find absolute path: from / to current directory
45
os.chdir(abspath + '/first_timers')
56
sys.path.append('./')
6-
import first_timers as first_timers
7+
import first_timers
78
import json
89

910

@@ -12,6 +13,7 @@
1213

1314

1415
def test_fetcher():
16+
"""Test whether first_timer_issues are getting picked up."""
1517
issue_list = first_timers.get_first_timer_issues()
1618
assert len(issue_list) > 0
1719

@@ -20,6 +22,7 @@ def test_fetcher():
2022

2123

2224
def test_get_fresh():
25+
"""Test whether fresh issues are retrieved."""
2326
new_issues = first_timers.get_fresh(example_issues[:-1], example_issues)
2427
assert new_issues[0] == example_issues[-1]
2528

0 commit comments

Comments
 (0)