Commit Graph

55 Commits

Author SHA1 Message Date
Tim Peters c885443479 Stop producing or using OverflowWarning. PEP 237 thought this would
happen in 2.3, but nobody noticed it still was getting generated (the
warning was disabled by default).  OverflowWarning and
PyExc_OverflowWarning should be removed for 2.5, and left notes all over
saying so.
2004-08-25 02:14:08 +00:00
Raymond Hettinger d6f6e50c9b Reworked test_warnings.py:
* It ran fine under "python regrtest.py test_warnings" but failed under
  "python regrtest.py" presumably because other tests would add to
  filtered warnings and not reset them at the end of the test.

* Converted to a unittest format for better control.  Renamed
  monkey() and unmonkey() to setUp() and tearDown().

* Increased coverage by testing all warnings in __builtin__.

* Increased coverage by testing regex matching of specific messages.
2003-07-13 08:37:40 +00:00
Raymond Hettinger dc9dcf135e This test failed on WindowsME because the full file path did not get
reported consistently with the *nix world.  'Lib/test/test_warnings.py'
came out as 'lib\test\test_warnings.py'.  The basename is all we care
about so I used that.
2003-07-13 06:15:11 +00:00
Jeremy Hylton b6d2f3e07d Don't include slash in search string; it's OS-specific. 2003-07-11 20:22:55 +00:00
Jeremy Hylton 8501466c7f Change warnings to avoid importing re module during startup.
Add API function simplefilter() that does not create or install
regular expressions to match message or module.  Extend the filters
data structure to store None as an alternative to re.compile("").

Move the _test() function to test_warnings and add some code to try
and avoid disturbing the global state of the warnings module.
2003-07-11 15:37:59 +00:00