Description
Bug description
When using the workspace-python-3.12 image, pytest discovery doesn't work as the pytest module isn't found
2023-10-21 14:26:43.442 [error] Error discovering pytest tests:
[n [Error]: Traceback (most recent call last):
File "/workspace/.vscode-remote/extensions/ms-python.python-2023.18.0-universal/pythonFiles/testing_tools/run_adapter.py", line 17, in
from testing_tools.adapter.main import parse_args, main
File "/workspace/.vscode-remote/extensions/ms-python.python-2023.18.0-universal/pythonFiles/testing_tools/adapter/main.py", line 9, in
from . import pytest, report
File "/workspace/.vscode-remote/extensions/ms-python.python-2023.18.0-universal/pythonFiles/testing_tools/adapter/pytest/init.py", line 7, in
from ._discovery import discover # noqa: F401
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/workspace/.vscode-remote/extensions/ms-python.python-2023.18.0-universal/pythonFiles/testing_tools/adapter/pytest/_discovery.py", line 8, in
import pytest
ModuleNotFoundError: No module named 'pytest'
Steps to reproduce
- https://gitpod.io/new#https://github.com/glenclayton/gitpod_pytest/tree/python_workspace
- Click on Testing
- Observe discovery fails and the error message above in Output->Python
Expected behavior
Using the workspace-full or default images works
- https://gitpod.io/new#https://github.com/glenclayton/gitpod_pytest
- Click on Testing
- Observe test is discovered and can be run
Example repository
- https://github.com/glenclayton/gitpod_pytest - works as expected
- https://github.com/glenclayton/gitpod_pytest/tree/python_workspace - fails test disovery
Anything else?
No response