0

I am facing this error "Can not find module src" while executing command pytest. My create_app function is inside src/ __init__.py

The structure of project is

project 

    src
       __init__.py

    tests
       __init__.py
       conftest.py

The error is raised from conftest.py when this line is executed

from src import create_app

1 Answer 1

1

Please make sure the src directory is in the python path. if not try this

import sys

sys.path.append('/path/to/src')
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.