trouble with unittest and namespaces - can anyone help?
lol at lolmc.nospam.com
Wed Nov 12 09:20:12 CET 2003
On Tue, 11 Nov 2003 18:55:16 -0500, Peter Hansen wrote:
<< snip snip >>
> Given that your tests are in a subfolder of the one where prog2.py
> is found, I'm not sure how you are invoking the tests right now
> such that they are working at all. How do they find "prog2"
> when they import it right now?
Yes Peter you're right I did mean sys.path.
I use some code from a tutorial in Linux Format magazine to get the test
in the subfolder to work as below:
# Import from this modules parent directory
Could you expand a little on your answer - perhaps using the structure I
used as an example?I tend to need a bit of hand-holding till I understand
the gist of what I'm shown.
More information about the Python-list