On Sunday 09 December 2001 02:13 pm, Tavis Rudd wrote:
> Hi,
> the folks over at the PyScons project have a guideline 'requiring'
> that every single module in their codebase be accompanied by
> <ModuleName>Tests.py that explicitly tests all functionality in that
> module.
>
> I'd like to propose that we include 'request' in the Webware
> guidelines that all modules that implement non-trivial behaviour be
> accompanied by a <ModuleName>_tests.py companion.  These *_tests
> unittest modules would would sit in the same dir as the other modules
> and would complement the 'Functional' tests that we put in each
> component's .Test package.
>
> What do you think?
> Tavis

It's probably not written down which is why it came up, but the current 
convention is to put TestFoo.py in Tests/. As in:

SomeKit/
        __init__.py
        Bar.py
        Foo.py
        Tests/
                TestBar.py
                TestFoo.py

You can see this already being done in MiscUtils.

I'm totally against cluttering up the main source directory with all 
the test files. As with examples, docs, admin, etc. they should just go 
in their own folder. (Frankly, I'd prefer if Python packages also had 
Code/ and ByteCode/ but oh well.)

I put the potentially-overkill Test prefix on the filenames due to 
possibly-ungrounded name collision fears.

Right now we put both unit tests and high level functional tests in 
Tests/. There are also other kinds of tests that you could recognize. 
I'd prefer they all go in Tests/. If your package gets really intense, 
you could always make directories underneath.


-Chuck

_______________________________________________
Webware-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-devel

Reply via email to