Python Unit test module throws “ModuleNotFoundError: No module named ‘tests.test_file'”

The issue got resolved after placing an empty __init__.py file in the tests folder.

For a better explanation about why it worked, refer to What is __init__.py for?

Thanks, @aws_apprentice for the help.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)