Skip to content

Commit d18c560

Browse files
committed
tests add example when error is raised
1 parent 16ae8b8 commit d18c560

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/test_raise_error.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import pytest
2+
3+
4+
def raise_type_error():
5+
raise TypeError()
6+
7+
8+
def test_raise_type_error():
9+
with pytest.raises(TypeError):
10+
raise_type_error()

0 commit comments

Comments
 (0)