this chunk of code is broken: method.description = ('test_expressions(%s, test_scalar=%r, ' 'dtype=%r, optimization=%r, exact=%r)') \ % (expr, test_scalar, dtype.__name__, optimization, exact) The line extension is not operating correctly. Change to this: method.description = ('test_expressions(%s, test_scalar=%r, ' 'dtype=%r, optimization=%r, exact=%r)') \ % (expr, test_scalar, dtype.__name__, optimization, exact)