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/2001-December/018969.html below:

[Python-Dev] regression tests with regrtest.py -r

[Python-Dev] regression tests with regrtest.py -rGuido van Rossum guido@python.org
Sat, 15 Dec 2001 13:01:07 -0500
>   On a lark, I decided to try running the regression tests with -r,

Good idea!

> which tells regrtest.py to run the tests in random order.  With this,
> I get the following warnings from test_long.py:
> 
> ../Lib/test/test_long.py:266: OverflowWarning: integer addition
>   special = [0, 1, 2, 3, sys.maxint-1, sys.maxint, sys.maxint+1]
[...]
> 
>   This was with the CVS trunk, which is still virtually identical to
> the 2.2c1 release.
>   I won't have time to look at them this weekend, but this should be
> fixed.  It may be possible there are other order-dependent behaviors,
> so it would be really good if people who have time can run the tests
> with -r on whatever platforms are available and report any other
> anomolies.

I've found the cause: test_scope.py contains a call to
warnings.resetwarnings(), which removes *all* warning filters, not
just those made by the calling module.  Because of the way
OverflowWarning is suppressed, this removes the "preset" filter that
suppresses OverflowWarning.

Since an API redesign before the 2.2 release is out of the question,
I'm fixing this by removing the resetwarnings() call from
test_scope.py and making the filterwarnings() call there a little more
specific.

--Guido van Rossum (home page: http://www.python.org/~guido/)



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