summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_warnings.py
Commit message (Collapse)AuthorAgeFilesLines
* Whitespace normalization.Tim Peters2006-06-271-1/+1
|
* 'warning's was improperly requiring that a command-line Warning category beBrett Cannon2006-06-221-0/+13
| | | | | | | both a subclass of Warning and a subclass of types.ClassType. The latter is no longer true thanks to new-style exceptions. Closes bug #1510580. Thanks to AMK for the test.
* Make test_warnings play nice with regrtest -R:: now that regrtest doesn'tThomas Wouters2006-04-161-4/+4
| | | | | always reload the module (specifically, it doesn't reload if the module has a 'test_main'.)
* Fix tests so they pass in -R modeNeal Norwitz2006-04-091-0/+4
|
* Don't filter out OverflowWarning; should be a test failure if it is raised byBrett Cannon2006-02-271-2/+1
| | | | the interpreter in 2.5 .
* Stop producing or using OverflowWarning. PEP 237 thought this wouldTim Peters2004-08-251-0/+1
| | | | | | | 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.
* Reworked test_warnings.py:Raymond Hettinger2003-07-131-46/+81
| | | | | | | | | | | | | * 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.
* This test failed on WindowsME because the full file path did not getRaymond Hettinger2003-07-131-2/+2
| | | | | | 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.
* Don't include slash in search string; it's OS-specific.Jeremy Hylton2003-07-111-1/+1
|
* Change warnings to avoid importing re module during startup.Jeremy Hylton2003-07-111-0/+53
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.