Add requested comment as per review
This commit is contained in:
parent
b98a182aa1
commit
55099e57c3
|
@ -642,6 +642,9 @@ def test_source_with_decorator() -> None:
|
||||||
|
|
||||||
src = inspect.getsource(deco_fixture)
|
src = inspect.getsource(deco_fixture)
|
||||||
assert src == " @pytest.fixture\n def deco_fixture():\n assert False\n"
|
assert src == " @pytest.fixture\n def deco_fixture():\n assert False\n"
|
||||||
|
# currenly Source does not unwrap decorators, testing the
|
||||||
|
# existing behavior here for explicitness, but perhaps we should revisit/change this
|
||||||
|
# in the future
|
||||||
assert str(Source(deco_fixture)).startswith("@functools.wraps(function)")
|
assert str(Source(deco_fixture)).startswith("@functools.wraps(function)")
|
||||||
assert str(Source(get_real_func(deco_fixture), deindent=False)) == src
|
assert str(Source(get_real_func(deco_fixture), deindent=False)) == src
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue