Add requested comment as per review

This commit is contained in:
Bruno Oliveira 2020-05-19 19:19:53 -03:00
parent b98a182aa1
commit 55099e57c3
1 changed files with 3 additions and 0 deletions

View File

@ -642,6 +642,9 @@ def test_source_with_decorator() -> None:
src = inspect.getsource(deco_fixture)
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(get_real_func(deco_fixture), deindent=False)) == src