Look at this post for advice.
So
Then import stuff from package folder and test it outside of the package.
When make package so should
So Python only need to find the project folder,in example in post i make virtual environment(sys.path set as default to folder to project folder).
One more example A sample Python project.
So
test
folder and tests should advisable be outside of the package folder.Then import stuff from package folder and test it outside of the package.
(Sep-21-2022, 09:31 AM)prathampatel9 Wrote: Kindly help me how can we import this without using sys pathMaybe you misunderstand how
sys.path
work,Python can not find anything whiteout it.When make package so should
project folder
be in sys.path the will Python find package(all files and sub-folder) and test folder.So Python only need to find the project folder,in example in post i make virtual environment(sys.path set as default to folder to project folder).
One more example A sample Python project.