The Role of __init__.py in pytest

pytest
Author

Imad Dabbura

Published

March 15, 2023

The only role __init__.py file in pytest is that it allows for duplicate test file names in different subdirectories as long as __init__.py exist in those subdirectories. Otherwise, it would return an error.