Skip to content

Commit

Permalink
Merge pull request #85 from kgashok/master
Browse files Browse the repository at this point in the history
refactored using __init__ and class import for #83
  • Loading branch information
arshadkazmi42 authored Jan 15, 2022
2 parents 0084b5b + 07f2262 commit 02e5601
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 8 deletions.
15 changes: 15 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

.PHONY: clean-pyc init lint test

lint:
flake8 --exclude=.tox

#init:
# pip install -r requirements.txt

test:
pytest --verbose --color=yes $(TEST_PATH)

clean-pyc:
echo "Cleaning, TBD"

8 changes: 8 additions & 0 deletions conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
'''
import pytest
@pytest.fixture
def input_value():
input = 39
return input
'''
Empty file added tests/__init__.py
Empty file.
12 changes: 4 additions & 8 deletions tests/test_basics.py → tests/test_basic.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
import os
import sys
relpath = os.path.dirname(__file__) # Find relative path: from current directory to test.py
abspath = os.path.abspath(".") # Find absolute path: from / to current directory
os.chdir(abspath + '/first_timers')
sys.path.append('./')
import first_timers

# attribution: https://containersolutions.github.io/runbooks/posts/python/module-has-no-attribute/#step-2
from first_timers import first_timers
import json


example_res = json.load(open('../data/example.json', 'r'))
example_res = json.load(open('data/example.json', 'r'))
example_issues = example_res['items']


Expand Down

0 comments on commit 02e5601

Please sign in to comment.