You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Move test failure to failing line for failed tests #4205
The new feature that shows test assertion failures within the test methods (#120) is very useful. However, I think of the red underlines as indicating linting/syntax errors, so I find it a bit confusing that they're overloaded to indicate test failures. Is there a setting to disable these diagnostics? If not, I'd be happy to work on a PR to implement that.
BTW, thanks for a fantastic extension!
Environment data
VS Code version: 1.30.2
Extension version (available under the Extensions sidebar): XXX
OS and version: MacOS 10.14.2
Python version (& distribution if applicable, e.g. Anaconda): Pyenv, 3.6.6
Type of virtual environment used (N/A | venv | virtualenv | conda | ...): Pipenv
Relevant/affected Python packages and their versions: pytest 4.1.0
Expected behaviour
Red underlines correspond to linting/syntax errors and don't show up for failing tests.
Actual behaviour
Red underlines appear under the names of failing tests:
Looking at the screenshot, the red squiggle should be on the assert line. Red squiggles indicate lines of code that are expected to fail at runtime, so since we know from running the test that this line of code has failed, the squiggle is appropriate.
Reacted by Yoz Grahame, Matthew McAllister and karlkovaciny
I am no longer see this issue occur. I am going to close with this in mind since it is old but please comment if you think something similar to this behavior still exists.
Activity
[-]Setting to disable test failure diagnostics[/-][+]Move test failure to failing line for failed tests[/+]qubitron commentedon Mar 5, 2019
Looking at the screenshot, the red squiggle should be on the assert line. Red squiggles indicate lines of code that are expected to fail at runtime, so since we know from running the test that this line of code has failed, the squiggle is appropriate.
eleanorjboyd commentedon Dec 5, 2023
I am no longer see this issue occur. I am going to close with this in mind since it is old but please comment if you think something similar to this behavior still exists.