I have a project with the following structure:
__init__.py
setup.py
- convert_keys/
- __init__.py
- convert.py
- tests/
- test_convert_keys.py
Within my tests
file I tried to import as follows;
from convert_keys import convert
but when trying to run the test file the error below appears;
python tests/test_convert_keys.py
Traceback (most recent call last): File "tests / test_convert_keys.py", line 3, in from convert_keys import convert ImportError: No module named convert_keys
My test file has only one class that inherits unittest.TestCase
, what is missing so that the file inside tests
can import the file in convert_keys
?