79613999

Date: 2025-05-09 11:11:14
Score: 0.5
Natty:
Report link

I finally found out the solution! I realized that once you put a __init__.py under the testing repository, pytest will see this folder as a module. Hence, you don'y need to set up any environment variable manually and the structure will look like below.

.
├── src
│   └── module_a.py
└── tests
    └── __init__.py
    └── test_module_a.py
Reasons:
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: Eric Wang