-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Description
Multi-project testing is now available for both pytest and unittest! 🎉
The Python extension now supports multi-project workspaces where each Python project gets its own test tree and Python environment in Test Explorer. This means if you have a monorepo or workspace with multiple Python projects, tests will be discovered and run independently per project using each project's configured environment.
Check out our full documentation on our wiki: https://github.com/microsoft/vscode-python/wiki/Multi%E2%80%90Project-Testing-in-VS-Code
Requirements:
- Python Environments extension must be installed and enabled
- Projects set up via the Python Environments extensions
Known limitation: When using unittest with nested projects, parent projects may discover tests from child projects, leading to duplicate entries. pytest handles this automatically with --ignore flags. If you're using unittest in a nested project structure, consider restructuring or switching to pytest.
If you face any issues with this new change- please add reproduction steps and a description so I can help resolve it! Thanks