'Why is my user defined module not found by the test script?

I tried creating the user-defined module for my project but my script is getting failed with an error message

ModuleNotFoundError: No module named 'Config'

The structure of my project is like this:

Project <Folder>
   |
   --- Config <Folder>
   |        |
   |        --- __init.py__
   |        --- Config.py
   --- Test cases
            |
            --- Testcase1.py

And the content of Testcase1.py is

import Config as config
print (config.main_url)


Solution 1:[1]

Your user-defined module should be in the same directory.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Christian Lowe