allow usage of unittest's load_tests protocol in python unit tests #12063
Labels
area-testing
feature-request
Request for new features or functionality
needs PR
Ready to be worked on
I have a project with the following structure:
This is the content of
test_functions.py
:In order to make the second test succeed I need to run some code before it. I do this by using unittest's load_test protocol. It is implemented in
tests/__init__.py
:If I run
python -m unittest
from the root dir, everything works fine:.. ---------------------------------------------------------------------- Ran 2 tests in 0.001s OK
I could not manage to use my custom test suite within the vs code python extension. If there is currently no solution, I would like to request this feature.
I am aware of other solutions like using setUp per test or module for this simple example. However in my real project the setup involves more complex steps like initializing an email server.
The text was updated successfully, but these errors were encountered: