230 |
231 |
232 |
233 |
234 |
235 |
236 |
237 |
238 |
239 |
240 |
241 |
242 | |
def test_getline_finally(): |
|
def c(): pass |
excinfo = py.test.raises(TypeError, """ |
teardown = None |
try: |
c(1) |
finally: |
if teardown: |
teardown() |
""") |
-> source = excinfo.traceback[-1].statement |
assert str(source).strip() == 'c(1)' | |