Skip to content

Test results not updated if test is run via codelens #6787

@Flamefire

Description

@Flamefire

Environment data

  • VS Code version: 1.36
  • Extension version (available under the Extensions sidebar): 2019.6.24221
  • OS and version: Linux Mint 19.1
  • Python version (& distribution if applicable, e.g. Anaconda): Python 3.6.0
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): None
  • Relevant/affected Python packages and their versions: pytest-3.9.1, same with pytest 5.0.1
  • Jedi or Language Server? (i.e. what is "python.jediEnabled" set to; more info How to update the language server to the latest stable version #3977): not jedi

Expected behaviour

After fixing a test case and running it via the codelens "Run Test" the success icon in the codelens and the error squiggle on the function should reflect that result

Actual behaviour

Running a test removes the success/failure icon in front of the codelens. Error squiggles are added if the test fails, but not removed, when it succeeds.

Steps to reproduce:

  1. create test function (e.g. def test_foo(): assert True)
  2. Use "Run All Tests" -> tick mark appears in code lens
  3. change to assert False. Run with codelens "Run Test" -> Tick dissappears, error squiggles appear
  4. change back to assert True and run with codelens -> Output shows success, no tick, error squiggles persist
  5. Run with "Run All Tests" -> tick mark appears in code lens, error squiggles removed

Logs

Logs look good, e.g. Python Test Log has =========================== 1 passed in 0.06 seconds ===========================

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-testingbugIssue identified by VS Code Team member as probable bugverifiedVerification succeeded

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions