Adding test

This commit is contained in:
Cheukting 2022-05-13 21:38:50 +01:00
parent 88634bd086
commit 460410b2f8
1 changed files with 11 additions and 0 deletions

View File

@ -1292,3 +1292,14 @@ def test_no_brokenpipeerror_message(pytester: Pytester) -> None:
# Cleanup.
popen.stderr.close()
def test_function_return_non_none_warning(testdir) -> None:
testdir.makepyfile(
"""
def test_stuff():
return "something"
"""
)
res = testdir.runpytest()
res.stdout.fnmatch_lines(["*PytestReturnNotNoneWarning: Test function returning*"])