donkirkby / live-py-plugin

Live coding in Python with PyCharm, Emacs, Sublime Text, or even a browser
https://donkirkby.github.io/live-py-plugin
MIT License
290 stars 57 forks source link

Syntax error under driver #581

Closed donkirkby closed 1 month ago

donkirkby commented 6 months ago

What I did

Wrote a class, and ran it with a pytest case in another file, then made some changes that included a syntax error.

class A:
    pass

class B

What happened

The display just said that the test doesn't call the current module. It doesn't say there's a syntax error, or where it is.

------------- | -------------------------------------------------------------------------------------------------- |
SystemExit: 4 | Python tests for test_foo.test_bar doesn't call the baz module. Try a different run configuration. |
------------- | -------------------------------------------------------------------------------------------------- |

What I wanted to happen

Show the syntax error next to the line where it occurs, just like it does without a driver module.

class A: |
    pass |
         |
class B  | SyntaxError: expected ':'

My environment

Describe the versions of everything you were using: