File tree Expand file tree Collapse file tree 4 files changed +44
-0
lines changed
Expand file tree Collapse file tree 4 files changed +44
-0
lines changed Original file line number Diff line number Diff line change 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+
9+ lint :
10+ pylint --disable=R,C hello.py
11+
12+ all : install lint test
Original file line number Diff line number Diff line change 1+ def toyou (x ):
2+ return f"hi { x } "
3+
4+
5+ def add (x ):
6+ return x + 1
7+
8+
9+ def subtract (x ):
10+ return x - 1
Original file line number Diff line number Diff line change 1+ pylint
2+ pytest
3+ black
Original file line number Diff line number Diff line change 1+ from hello import toyou , add , subtract
2+
3+
4+ def setup_function (function ):
5+ print (f" Running Setup: { function .__name__ } " )
6+ function .x = 10
7+
8+
9+ def teardown_function (function ):
10+ print (f" Running Teardown: { function .__name__ } " )
11+ del function .x
12+
13+
14+ ### Run to see failed test
15+ #def test_hello_add():
16+ # assert add(test_hello_add.x) == 12
17+
18+ def test_hello_subtract ():
19+ assert subtract (test_hello_subtract .x ) == 9
You can’t perform that action at this time.
0 commit comments