-2

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]:

paul-shuvo
  • 1,874
  • 4
  • 33
  • 37
mtthsv
  • 1

1 Answers1

0

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
user_na
  • 2,154
  • 1
  • 16
  • 36