niikun commited on
Commit
980275a
·
1 Parent(s): b7c9616

first commit

Browse files
Files changed (4) hide show
  1. Makefile +14 -0
  2. hello.py +2 -0
  3. requirements.txt +4 -0
  4. test_hello.py +6 -0
Makefile ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ install:
2
+ pip install --upgrade pip &&\
3
+ pip install -r requirements.txt
4
+
5
+ test:
6
+ python -m pytest -vv test_hello.py
7
+
8
+ format:
9
+ black *.py
10
+
11
+ lint:
12
+ pylint --disable=R,C hello.py
13
+
14
+ all: install lint test format
hello.py ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ def hello(name):
2
+ return f"hello {name}"
requirements.txt ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ pytest
2
+ pytest -conv
3
+ pylint
4
+ black
test_hello.py ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ from hello import hello
2
+
3
+
4
+ def test_hello():
5
+ name = "niikun"
6
+ assert "hello niikun" == hello("niikun")