216 |
217 |
218 |
219 |
220 |
221 |
222 |
223 |
224 |
225 |
226 |
227 |
228 | |
def test_getstartingblock_multiline(): |
class A: |
def __init__(self, *args): |
frame = sys._getframe(1) |
self.source = py.code.Frame(frame).statement |
|
x = A('x', |
'y' \ |
, |
-> 'z') |
|
l = [i for i in x.source.lines if i.strip()] |
assert len(l) == 4 | |