Skip to content

Commit e17d986

Browse files
committed
created test case
1 parent 0164702 commit e17d986

File tree

5 files changed

+13
-1
lines changed

5 files changed

+13
-1
lines changed

.github/workflows/devops.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
make lint
1919
- name: Test with pytest
2020
run: |
21-
#make test
21+
make test
2222
- name: Format code
2323
run: |
2424
make format

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ lint:
1010
#py lint
1111
pylint --disable=R,C *.py mylib/*.py
1212

13+
test:
14+
#test code
15+
python -m pytest -vv --cov=mylib test_script.py
16+
1317
deploy:
1418
#deploy
1519

Readme.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ SWE Project :
2222
2323
> If there is any error, eg: error in lint . CI will throw error during build.
2424
25+
> created test cases for script file.
26+
2527

2628

2729

1.18 KB
Binary file not shown.

test_script.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
from mylib.script import wiki
2+
3+
def test_wiki():
4+
assert "god" in wiki()
5+
6+

0 commit comments

Comments
 (0)