fix #4386 - restructure construction and partial state of ExceptionInfo
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user