show a simple and easy error when keyword expressions trigger a syntax error #2953
Submitted this too early, it's been edited to fix.
Specifically, this works:
but this does not:
Examples with no problem:
pytest -k "command or mport" pytest -k "mport or command" pytest -k "command or fi"
Examples with a problem
pytest -k "command or import" pytest -k "import or command" pytest -k "command or if"
The text was updated successfully, but these errors were encountered:
Fair enough -- but shouldn't it show something other than:
..it should be pretty direct to catch the error or do a quick check for tokens that match keywords, and say "Python keywords not accepted in expressions passed to '-k'."