| 131 |
| 132 |
| 133 |
| 134 |
| 135 |
| 136 |
| 137 |
| 138 |
| 139 |
| 140 |
| 141 |
| 142 |
| 143 |
| 144 |
| 145 |
| 146 |
| 147 |
| 148 |
| 149 | |
def test_traceback_getcrashentry(self): |
def i(): |
__tracebackhide__ = True |
raise ValueError |
def h(): |
i() |
def g(): |
__tracebackhide__ = True |
h() |
def f(): |
g() |
|
excinfo = py.test.raises(ValueError, f) |
tb = excinfo.traceback |
-> entry = tb.getcrashentry() |
co = py.code.Code(h) |
assert entry.frame.code.path == co.path |
assert entry.lineno == co.firstlineno + 1 |
assert entry.frame.code.name == 'h' | |