fix #4386 - restructure construction and partial state of ExceptionInfo

This commit is contained in:
Ronny Pfannschmidt
2018-11-22 12:20:14 +01:00
parent 6e85febf20
commit 88bf01a31e
12 changed files with 113 additions and 59 deletions

View File

@@ -169,7 +169,7 @@ class TestExceptionInfo(object):
else:
assert False
except AssertionError:
exci = _pytest._code.ExceptionInfo()
exci = _pytest._code.ExceptionInfo.from_current()
assert exci.getrepr()
@@ -181,7 +181,7 @@ class TestTracebackEntry(object):
else:
assert False
except AssertionError:
exci = _pytest._code.ExceptionInfo()
exci = _pytest._code.ExceptionInfo.from_current()
entry = exci.traceback[0]
source = entry.getsource()
assert len(source) == 6