192 |
193 |
194 |
195 |
196 |
197 |
198 |
199 |
200 | |
def test_compile_and_getsource(self): |
co = self.source.compile() |
exec co |
f(7) |
-> excinfo = py.test.raises(AssertionError, "f(6)") |
frame = excinfo.traceback[-1].frame |
stmt = frame.code.fullsource.getstatement(frame.lineno) |
|
assert str(stmt).strip().startswith('assert') | |