Closed pytestbot closed 9 years ago
Original comment by Thomas Tanner (BitBucket: ttanner, GitHub: ttanner):
I've tracked it down to code.py: getsource()
A line break in the test function makes the difference. This fails:
#!python
if cond: obj.method(arg)
else: obj.method()
while this works:
#!python
if cond: obj.method(arg)
else:
obj.method()
Somehow the function source code is not properly parsed in getsource()
Original comment by Floris Bruynooghe (BitBucket: flub, GitHub: flub):
Finally traced this down, if you're in a hurry this is the fix: https://bitbucket.org/flub/py/commits/e5a98a808315979d034a299066f41adbf6ac4052
Originally reported by: Thomas Tanner (BitBucket: ttanner, GitHub: ttanner)
Tested with both version 2.6.0 and 2.6.1. Both fail: