I have a directory structure like this:
/myapp
__init__.py
/app
/main.py
/test
/test_main.py
__init__py (/myapp/__init__py) has imports defined as:
from flask import Flask
app = Flask(__name__)
# some code
test_main.py(/myapp/test/test_main.py) has imports:
import unittest
from myapp import app
# Testing code
When I try to test test_main.pyc (pytest test_main.py), it throws an ImportError: No module named myapp
I'm unable to find out why it is unable to import.