Skip to content

Commit d670b97

Browse files
committed
adding code for failed test
1 parent 6bb6ca5 commit d670b97

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

chapter6/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
test:
2+
python -m pytest --pdb

chapter6/test_debug.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
from hello_debug import add
2+
import pytest
3+
4+
@pytest.fixture
5+
def myobj():
6+
class Foo():pass
7+
return Foo()
8+
9+
def test_add():
10+
assert add(1,2) == 3
11+
12+
def test_add_object(myobj):
13+
assert add(1,myobj) == 3
14+

0 commit comments

Comments
 (0)