On 2015-08-16 01:28, Alan Gauld wrote:

Here is my default structure

project
- doc   project documents: contracts reqs, designs, test specs etc
- man(*)   user docs
- bin(*)   the master exe or main.py type files
- lib(*)   the shipping libraries
- src      the code
-- lang      folder per language used - sql, python, C, bash, etc
--- lib      modules/packages - subfolder per package
--- test     test code - sub-tree under this, depends on test tools.
--- tools    tools used but not shipped - db load/reset etc
--- main     folder in some languages, a file in others

Alan,
Assuming the above structure and further assuming that your python test suite is under test,
how do you arrange to import code that is under main?
I have only been able to figure out how to import code that is at the same or lower level in the file structure. If one's test code was in --- test/test.py, an import of --- main or main/mycode.py would have to 'find' the latter by traveling up the tree to test and then over to main, or over to main and then down to mycode.py.
I've not been able to do that.  Is there a way?
Alex
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to