I am trying to understand classes and I cannot access to class in different file. What I want to do: I have to files aaaa.py and unittest.py in folder temp. aaaa.py:
class Test:
def __init__(self):
print('Test')
def function(self):
print('Test3')
unittest.py:
import temp.aaaa
y = temp.aaaa.Test()
when I run unittest I get error:
AttributeError: module 'temp' has no attribute 'aaaa'
what is the problem?
edit: project structure:
->Project:
--> temp:
---> extr(folder)
---> __init__.py
---> aaaa.py
---> unittest.py
---> test.txt