Closed
Description
Originally reported by: Jurko Gospodnetić (BitBucket: jurko, GitHub: jurko)
When pytest is run on the following module:
def f(): return []
f() += [5]
It reports a confusing error message:
E SystemError: ..\Objects\tupleobject.c:126: bad argument to internal function
While when that same module is run directly it reports a clearer:
SyntaxError: can't assign to function call
On other types of errors (e.g. replace the last line of the initial script with just 'foo'), error messages returned by pytest & direct Python calls match.
Can the error message presented by pytest be improved?
Tested using pytest 2.2.4 on Windows 7 x64 with 64bit Python 3.2.3.
Best regards,
Jurko Gospodnetić