On Wed, Jul 7, 2010 at 13:53, Alexander Belopolsky
<alexander.belopol...@gmail.com> wrote:
> On Wed, Jul 7, 2010 at 4:33 PM, Brett Cannon <br...@python.org> wrote:
>
>>>>> 2. There are test classes defined at the test_datetime module level
>>>>> that subclass from datetime classes.  The self.module is not available
>>>>> at the module level.  These should probably be moved to setUp()
>>>>> methods and attached to test case self.
> ..
>>> What about #2?
>
>> Either define two different subclasses or write a function that
>> returns the class using the superclass that you want.
>>
>
> Selecting one of two globally defined different subclasses will be
> ugly in parameterized tests.

Didn't say it was a pretty solution. =)

>  An in the other approach, the class
> definitions will have to be moved away from the module level and
> inside a scope where module variable is present.

Yep, which is not a big deal.

>  Yes, it looks like
> some refactoring is unavoidable.
>

=)
_______________________________________________
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