Skip to content

Commit bc0a0e5

Browse files
committed
fix: check TypeError raised
1 parent 2cb4dd3 commit bc0a0e5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: testing/code/test_source.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ def deco_fixture():
479479
assert False
480480

481481
# Since deco_fixture is now an instance of FixtureFunctionDef the getsource function will not work on it.
482-
with pytest.raises(Exception):
482+
with pytest.raises(TypeError, match=r"FixtureFunctionDefinition"):
483483
inspect.getsource(deco_fixture)
484484
src = inspect.getsource(deco_fixture._get_wrapped_function())
485485
assert src == " @pytest.fixture\n def deco_fixture():\n assert False\n"

0 commit comments

Comments
 (0)