import sys, os # Ensure the project root is on the path so `from main import app` works sys.path.insert(0, os.path.dirname(__file__))