| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
|
|
|
| |
test_warnings use case (also fixes some bugs in the original implementation)
|
|
|
|
| |
of modules, including the ability to block extension modules in order to test the pure Python fallbacks
|
|
|
|
| |
filter and was resetting it.
|
|
|
|
|
|
| |
called in a thread that was spawned by an import itself.
Last part to close #1665206.
|
|
|
|
|
|
| |
Was a DeprecationWarning for not supporting it since Python 2.6.
Closes issue #3652.
|
|
|
|
| |
test suite. Closes issue w.r.t. 2.6 (R: Brett Cannon)
|
|
|
|
|
|
|
|
| |
WarningsRecorder object. This makes the API simpler to use as no special object
must be learned.
Closes issue 3781.
Review by Benjamin Peterson.
|
|
|
|
|
| |
Closes issue 3776.
Review by Nick Coghlan.
|
|
|
|
|
|
|
|
|
|
|
| |
catch_warnings(), and clean up the API.
While expanding the test suite, a bug was found where a warning about the
'line' argument to showwarning() was not letting functions with '*args' go
without a warning.
Closes issue 3602.
Code review by Benjamin Peterson.
|
|
|
|
| |
python-dev. Also add explicit tests for itto test_warnings.
|
|
|
|
|
|
|
|
| |
bus errors or SystemError being raised. As a side effect of fixing this, a bad
DECREF that could be triggered when 'message' and 'category' were both None was
fixed.
Closes issue 3211. Thanks JP Calderone for the bug report.
|
| |
|
| |
|
|
|
|
| |
the stack was being unwound by two levels instead of one each time.
|
|
|
|
| |
that lacks support for the new 'line' argument.
|
|
|
|
|
|
|
| |
raised an exception properly when __file__ is not set, __name__ == '__main__',
and sys.argv[0] is a false value.
Closes issue2743.
|
|
|
|
| |
Perform additional cleanup, mostly deleting from sys.modules, or clearing the warnings registry.
|
|
|
|
| |
number of splits.
|
|
|
|
| |
Windows.
|
|
|
|
| |
when it is run.
|
|
|
|
|
|
|
|
|
| |
'warnings' code in places where it was previously not possible (e.g., the
parser). It could also potentially lead to a speed-up in interpreter start-up
if the C version of the code (_warnings) is imported over the use of the
Python version in key places.
Closes issue #1631171.
|
|
|
|
| |
Still need tests for warn_explicit and simplefilter.
|
| |
|
|
|
|
|
|
|
|
| |
test.test_support.catch_warning is more full-featured and provides the same
functionality.
Since guard_warnings_filter was added in 2.6 there is no
backwards-compatibility issues.
|
|
|
|
|
|
|
| |
be used to catch the last warning issued by the warning framework.
Change test_warnings.py and test_structmembers.py to use this
new contextmanager.
|
|
|
|
| |
Test that the stacklevel is handled correctly.
|
| |
|
|
|
|
|
| |
class to that reusing the functionality in test_structmembers.py doesn't rerun
the tests from test_warnings.py.
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
always reload the module (specifically, it doesn't reload if the module has
a 'test_main'.)
|
| |
|
|
|
|
| |
the interpreter in 2.5 .
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
| |
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.
|
| |
|
|
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.
|