Skip to content

"There was an error in running the tests." when stopping debugger #16475

@bagage

Description

@bagage

Environment data

  • VS Code version: 1.57.0
  • Extension version (available under the Extensions sidebar): v2021.5.926500501
  • OS and version: Fedora 34
  • Python version (& distribution if applicable, e.g. Anaconda): 3.8 with pipenv
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): venv
  • Relevant/affected Python packages and their versions: pytest 6.2.4
  • Relevant/affected Python-related VS Code extensions and their versions:
  • Value of the python.languageServer setting: pylance

Expected behaviour

When stopping debugging tests, I expect tests to be stopped without any error notification.

Actual behaviour

When disconnecting the debugger, tests are stoped and an error notification There was an error in running the tests. appears. When clicking View output, the only "error" visible is:

Error: TypeError: Cannot read property 'testsuites' of null

Steps to reproduce:

  1. clone https://github.com/bagage/vscode-python-pytest
  2. put a breakpoint on test_sum.py:2
  3. run tests via vscode UI
  4. wait for breakpoint to be triggered
  5. stop debugger

Logs

Output for Python in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python)

(empty)

Output for Python Test Log in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Python Test Log)

Error: TypeError: Cannot read property 'testsuites' of null

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