Why does pytest not collect my test?
My folder structure:
src
|-- examplemodule.py
tests
|-- test_examplemodule.py
Content of test_examplemodule.py:
from unittest import TestCase
class TestExamplemodule(TestCase):
def run_mock_example(self):
# do stuff
Running python3 -m pytest tests gives me collected 0 tests
>Solution :
The function name should start or end with test_ or _test respectively. So in your case test_run_mock_example()