Skip to content

Better reporting for non-keyword arg syntax error #356

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
pytestbot opened this issue Sep 18, 2013 · 6 comments
Closed

Better reporting for non-keyword arg syntax error #356

pytestbot opened this issue Sep 18, 2013 · 6 comments
Labels
type: bug problem that needs to be addressed

Comments

@pytestbot
Copy link
Contributor

Originally reported by: Wayne Werner (BitBucket: waynew, GitHub: waynew)


When running pytest I got this error:

E SystemError: ../Objects/tupleobject.c:143: bad argument to internal function

Which was quite confusing. After searching, I found issue #154, which led me to find the actual issue - that I was getting this error:

SyntaxError: non-keyword arg after keyword arg

It seems that there might be an issue in general with SyntaxError handling within pytest - though I haven't looked through the source to see if there's a better way to handle that.


@pytestbot
Copy link
Contributor Author

Original comment by holger krekel (BitBucket: hpk42, GitHub: hpk42):


can you post an example that produces the problem?

@pytestbot
Copy link
Contributor Author

Original comment by Wayne Werner (BitBucket: waynew, GitHub: waynew):


This should do it.

@pytestbot
Copy link
Contributor Author

Original comment by Ronny Pfannschmidt (BitBucket: RonnyPfannschmidt, GitHub: RonnyPfannschmidt):


can reproduce on python3.2, seems like a bug in ast

@pytestbot
Copy link
Contributor Author

Original comment by Ronny Pfannschmidt (BitBucket: RonnyPfannschmidt, GitHub: RonnyPfannschmidt):


i identified it as a bug in python, there seems to be no reasonable workaround

@pytestbot
Copy link
Contributor Author

Original comment by Ronny Pfannschmidt (BitBucket: RonnyPfannschmidt, GitHub: RonnyPfannschmidt):


according to http://bugs.python.org/issue11441 it is no longer a issue
futrher investigation shows that a python update is needed

@pytestbot
Copy link
Contributor Author

Original comment by holger krekel (BitBucket: hpk42, GitHub: hpk42):


thanks ronny. so a Python update should solve it.

@pytestbot pytestbot added the type: bug problem that needs to be addressed label Jun 15, 2015
fkohlgrueber pushed a commit to fkohlgrueber/pytest that referenced this issue Oct 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug problem that needs to be addressed
Projects
None yet
Development

No branches or pull requests

1 participant