Skip to content

pytest discovery seems to fail in Python 3.8 #8812

@albireox

Description

@albireox

Environment data

  • VS Code version: 1.4.10-insiders
  • Extension version (available under the Extensions sidebar): 2019.12.51221-dev
  • OS and version: macOS 10.15.1
  • Python version (& distribution if applicable, e.g. Anaconda): 3.8.0
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): pyenv
  • Relevant/affected Python packages and their versions: pytest 5.3.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): Language Server

Expected behaviour

Discovery tests works fine.

Actual behaviour

Discovery tests fails with error

SyntaxError: Unexpected token � in JSON at position 0"

Steps to reproduce:

I think this occurs only in Python 3.8 (the same code, in Python 3.7 works fine). The cause may be because in Python 3.8 pytests returns a the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses warning. Not sure if that may be crashing the parsing of the output.

Metadata

Metadata

Labels

bugIssue identified by VS Code Team member as probable buginfo-neededIssue requires more information from poster

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions