pytester: runpytest_inprocess: use splitlines()

This avoids having a trailing empty lines always.
This commit is contained in:
Daniel Hahler
2019-10-23 00:00:15 +02:00
parent f0c2b070c5
commit 2f589a9769
3 changed files with 6 additions and 5 deletions

View File

@@ -878,7 +878,9 @@ class Testdir:
sys.stdout.write(out)
sys.stderr.write(err)
res = RunResult(reprec.ret, out.split("\n"), err.split("\n"), time.time() - now)
res = RunResult(
reprec.ret, out.splitlines(), err.splitlines(), time.time() - now
)
res.reprec = reprec
return res