diff --git a/testing/code/test_source.py b/testing/code/test_source.py index c7d879675..f31748c0e 100644 --- a/testing/code/test_source.py +++ b/testing/code/test_source.py @@ -405,21 +405,13 @@ def test_deindent(): assert deindent(["\tfoo", "\tbar"]) == ["foo", "bar"] - def f(): - c = """while True: - pass -""" - - lines = deindent(inspect.getsource(f).splitlines()) - assert lines == [" def f():", ' c = """while True:', " pass", '"""'] - - source = """ + source = """\ def f(): def g(): pass """ lines = deindent(source.splitlines()) - assert lines == ["", "def f():", " def g():", " pass"] + assert lines == ["def f():", " def g():", " pass"] def test_source_of_class_at_eof_without_newline(tmpdir):