On Wed, Jul 7, 2010 at 5:56 PM, Michael Foord <fuzzy...@voidspace.org.uk> wrote:
..
>> Well, I personally would call that bad form to import those classes
>> explicitly, but that's just me. You will simply need to make them work
>> off of the module object. There is nothing wrong with "cleaning up"
>> the tests as part of your work; the tests code should not be enshrined
>> as perfect.
>>
>>
>
> Yep - each test should take the module under test (either in C or Python) as
> the parameter and used classes / functions as attributes off the module
> object.
>

This is somewhat uncharted territory.  So far test_* methods had no
parameters except self and module was attached to the TestCase
subclass.  It would be accessed inside test_* methods as self.module.
 I think changing test_* methods' signature is too much of a price to
pay for saving self. prefix.  I will still have to touch every date,
time, datetime, etc symbols throughout the test file.
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to