A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2010-July/101568.html below:

[Python-Dev] Python equivalents in stdlib Was: Include datetime.py in stdlib or not?

[Python-Dev] Python equivalents in stdlib Was: Include datetime.py in stdlib or not? [Python-Dev] Python equivalents in stdlib Was: Include datetime.py in stdlib or not?Brett Cannon brett at python.org
Wed Jul 7 23:36:25 CEST 2010
On Wed, Jul 7, 2010 at 13:53, Alexander Belopolsky
<alexander.belopolsky at gmail.com> wrote:
> On Wed, Jul 7, 2010 at 4:33 PM, Brett Cannon <brett at 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.
>

=)
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4