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/2011-August/112740.html below:

[Python-Dev] unittest bug

[Python-Dev] unittest bugMichael Foord fuzzyman at voidspace.org.uk
Wed Aug 3 23:44:50 CEST 2011
On 3 Aug 2011, at 22:58, Ethan Furman wrote:
> Michael Foord wrote:
>> On 3 Aug 2011, at 21:36, Ethan Furman wrote:
>>> My apologies for posting here first, but I'm not yet confident enough in my bug searching fu, and duplicates are a pain.
>>> 
>>> Here's the issue:
>>> 
>>> from unittest import *
>> That's the bug right there. Just import TestCase and main and everything should work fine. Using "import *" is not recommended except at the interactive interpreter and it doesn't play well with unittest.main which does magic introspection to find tests to run.
> 
> If from xxx import * is not supported, why provide __all__?  

a) to define the public API
b) to limit the symbols exported - that is not the same as having main(…) work with import *, they're orthogonal

> At the very least the lack of a warning is a documentation bug.
> 

Feel free to propose a patch fixing that problem (on the issue tracker please).

All the best,

Michael Foord

> ~Ethan~
> 




--
http://www.voidspace.org.uk/


May you do good and not evil
May you find forgiveness for yourself and forgive others
May you share freely, never taking more than you give.
-- the sqlite blessing 
http://www.sqlite.org/different.html





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