question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Is it possible to connect pytest assert failures to problems and code views?

See original GitHub issue

From @hendrics on May 21, 2017 20:15

Hi. I was wondering if there’s an option to integrate assert failures and problem/code view.

I managed to hack it together using problemMatchers for tasks. See the details example here https://github.com/hendrics/python-vscode-pytest-example

Also i am looking for an ability to add links to the Output view to jump to the code. There are open issues on the vscode to address it via matchers.

So overall copy pasting the tasks.json around is not scalable and i am wondering if there’s scope to add it to this extension unless it is already implemented.

Environment data

VS Code version: Version 1.12.2 (1.12.2) Python Extension version: Version 0.6.4 (4 May 2017) Python Version: 2.7.11 OS and version: macOS El Capitan

Copied from original issue: DonJayamanne/pythonVSCode#973

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:11
  • Comments:6

github_iconTop GitHub Comments

6reactions
DonJayamannecommented, Dec 20, 2018
screen shot 2018-12-20 at 3 39 36 pm
2reactions
DonJayamannecommented, Nov 13, 2017

Does sound like a good suggestion, however what’s interesting is that this hasn’t been up voted by anyone. I’ll check this feature with my colleagues and get back to you. There could be other edge cases that need to be considered, e.g. what if the unit tests pass, we’ll then need to ensure the problems disappear.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to run all PyTest assertions even if some of them fail?
What I'd like to do is to have the code continue to execute even after PyTest encounters the first failure. python · pytest...
Read more >
Non Blocking Assertion Failures with Pytest-check - TestProject
The trouble with Python's Inbuilt assert method is that it stops the test on first failure. This makes perfect sense in some scenarios....
Read more >
How to write and report assertions in tests - Pytest
Rewritten assert statements put introspection information into the assertion failure message. pytest only rewrites test modules directly discovered by its test ...
Read more >
Python | Assertion Error - GeeksforGeeks
Assertion is a programming concept used while writing a code where the user declares a condition to be true using assert statement prior...
Read more >
Testing tools - Django documentation
If you point the test client at a view that raises an exception and Client.raise_request_exception is True , that exception will be visible...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found