Skip to content

problems with folder organization #3356

Answered by aryuemaan
Felidgj asked this question in Q&A
Discussion options

You must be logged in to vote

It sounds like you're encountering a common issue with Python's module import system when organizing your project, especially when tests are in a subfolder. You're right, the goal is to keep your project organized with tests in their own folder while still being able to import modules from the root or other parts of your project.

You can follow something like this

my_project/
├── my_module.py
├── utils/
│ ├── init.py
│ └── helper_functions.py
└── tests/
├── init.py
└── test_my_module.py

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by Felidgj
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants