I'm trying to make unit tests for my train.py file. But I can't import the train.py file. I've tried everything in comments on my screenshot. the structure is as follow:
project/
train.py
unit_tests/
train_test.py
[1]:
I'm trying to make unit tests for my train.py file. But I can't import the train.py file. I've tried everything in comments on my screenshot. the structure is as follow:
project/
train.py
unit_tests/
train_test.py
[1]:
Can you paste your actual project structure? It could be that you need to do a relative import. As example:
from .project import train
from ..project import train
from . import train