On 1/17/07, Kent Johnson <[EMAIL PROTECTED]> wrote:
Thomas Coopman wrote:
> When I run One.py from in the directory A, doesn't look python in it's
> parent directory when it can't find the module?
> And if that's not the case where and what should I add to the sys.path
> variable?
No, Python wo
Thomas Coopman wrote:
> When I run One.py from in the directory A, doesn't look python in it's
> parent directory when it can't find the module?
> And if that's not the case where and what should I add to the sys.path
> variable?
No, Python won't look in parent directories for imports. Try runni
On 1/17/07, Kent Johnson <[EMAIL PROTECTED]> wrote:
Thomas Coopman wrote:
> Well I don't really
> need the circular imports but I would like to know how to do the imports
correct.
>
> Suppose that in the example that I showed only One needs Two.
>
> So then we have this:
>
> M/
> __init__.py
> A
Thomas Coopman wrote:
> Well I don't really
> need the circular imports but I would like to know how to do the imports
> correct.
>
> Suppose that in the example that I showed only One needs Two.
>
> So then we have this:
>
> M/
> __init__.py
> A/
> __init__.py
> One.py
> B/
> __init__.py
> T
On 1/17/07, Kent Johnson <[EMAIL PROTECTED]> wrote:
thomas coopman wrote:
> On Tue, 16 Jan 2007 10:06:37 -
> "Alan Gauld" <[EMAIL PROTECTED]> wrote:
>
>> "Thomas Coopman" <[EMAIL PROTECTED]> wrote
>> .
>>> I wondered if it was possible to do something like this:
>>>
>>> src/
>>>-a_module
thomas coopman wrote:
> On Tue, 16 Jan 2007 10:06:37 -
> "Alan Gauld" <[EMAIL PROTECTED]> wrote:
>
>> "Thomas Coopman" <[EMAIL PROTECTED]> wrote
>> .
>>> I wondered if it was possible to do something like this:
>>>
>>> src/
>>>-a_module/
>>>-sub_module/
>>> test/
>>>-a_module/
On Tue, 16 Jan 2007 10:06:37 -
"Alan Gauld" <[EMAIL PROTECTED]> wrote:
>
> "Thomas Coopman" <[EMAIL PROTECTED]> wrote
> .
> > I wondered if it was possible to do something like this:
> >
> > src/
> >-a_module/
> >-sub_module/
> > test/
> >-a_module/
> >-sub_module/
> >
> I wondered if it was possible to do something like this:
>
> src/
>-a_module/
>-sub_module/
> test/
>-a_module/
>-sub_module/
Why not really keep the test code with the main code?
# module code here
#
if __name__ == '__main__':
import unittest
class TestModul
Thomas Coopman wrote:
> Hi,
>
> the documentation of pyunit
> say that it is good to place the unittest in a seperate module.
> I wondered if it was possible to do something like this:
>
> src/
> -a_module/
> -sub_module/
> test/
> -a_module/
> -sub_module/
>
> So the te
On Tue, 16 Jan 2007 10:06:37 -
"Alan Gauld" <[EMAIL PROTECTED]> wrote:
>
> "Thomas Coopman" <[EMAIL PROTECTED]> wrote
> .
> > I wondered if it was possible to do something like this:
> >
> > src/
> >-a_module/
> >-sub_module/
> > test/
> >-a_module/
> >-sub_module/
> >
"Thomas Coopman" <[EMAIL PROTECTED]> wrote
.
> I wondered if it was possible to do something like this:
>
> src/
>-a_module/
>-sub_module/
> test/
>-a_module/
>-sub_module/
>
I don;t see any reason why not although its slightly more work.
Personally I tend to keep the test
11 matches
Mail list logo