Assuming PYTHONPATH=. and you are in the project folder , then ...
import classes_folder.class1
By "located" I mean that you are using python from the project folder .
all this is relative to your PYTHONPATH . Keep this in mind.
So, if you are in the project folder/tests_folder to avoid problems, make PYTHONPATH absolute for the root of your project:
export PYTHONPATH=/full/path/to/project_folder
and then you will not have problems when running tests from another folder.
change response to comment about changing python path at runtime
import sys sys.path.append("/full/path/to/project_folder")
or even better, you can do this based on where you get python from ...
import sys,os home_project=os.path.abspath(".") sys.path.append(home_project)
source share