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.

Code lens not showing up for nose, running a single test method executes it twice

See original GitHub issue
  1. No configuration changes occured during this.
  2. Code lens for testing started acting up (like here or here ), i.e. started “lagging” behind changes and being misplaced.
  3. After restart, tests were no longer found by the extension, and stopped showing up in code at all. Note that F1 > “Run All Unit Tests” still ran nosetests with proper configuration, and output to the test console. See “actual behavior” below.

Relevant part of setup.cfg:

[nosetests]
verbosity=0
with-doctest=0
with-coverage=1
cover-package=RedactedPackageName

Environment data

  • VS Code version: 1.26.1
  • Extension version (available under the Extensions sidebar): 2018.7.1
  • OS and version: Windows 10 pro
  • Python version (& distribution if applicable, e.g. Anaconda): Python 3.6.6, Conda 4.5.4
  • Type of virtual environment used (N/A | venv | virtualenv | conda | …): conda env
  • Relevant/affected Python packages and their versions: nose=1.3.7=py36_2 coverage=4.5.1=py36hfa6e2cd_0
  • Linter: flake8

Have Git Lens installed, but line features are disabled.

Actual behavior

Tests run just fine, but extension doesn’t notice. (This is the “Python Tests” panel)

image

Expected behavior

Tests are found, code lens shows “Run Test | Debug Test” buttons again.

Steps to reproduce:

No idea, sorry. I tried getting it working, obviously, but I can’t reproduce it on my home machine.

Logs

Python console log:

Starting Jedi Python language engine.
##########Linting Output - flake8##########

For Python Testing, see the screenshot above (“Actual Behavior”).

Output from Console under the Developer Tools panel (toggle Developer Tools on under Help):

image

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
spiucommented, Oct 4, 2018

I found out that codelens issue is related to the gitlens extension probably deleting other’s. When disabled I see the run/debug test codelenses show up correctly.

Moving from nose to pytest removes the tests from running twice

2reactions
brettcannoncommented, Sep 20, 2018

I get the code lenses, but the double execution is still occurring.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Codelens not showing test status for methods that implements ...
The codelens for test status (such as "11/11 passing") is not being shown if the method being tested is an implementation of an...
Read more >
visual studio - Code lens not showing correct number of tests
In the VS 2013, I see number of unit tests for a method. It works fine if I am calling the method directly...
Read more >
Find code changes and other history with CodeLens
Review the tests for the code by pressing Alt+3. , the tests haven't run yet, so run them. To review a test's definition,...
Read more >
GOODENOUGH DRAW – A – PERSON TEST
This test is to be used primarily as a screening device. ... Nose present; Mouth present; Nose and mouth in two dimensions, two...
Read more >
21 CFR Part 801 -- Labeling
In the case of nonconsumer packages, the ZIP Code shall appear on either the ... not inhibit the manufacturer from using equal or...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

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