[issue20131] warnings module offers no documented, programmatic way to reset "seen-warning" flag

2021-05-18 Thread Catherine Devlin
Catherine Devlin added the comment: I think that it's possible to get the desired behavior by setting a filter to "always". ``` > cat warnme.py import warnings for i in range(3): warnings.warn("oh noes!") > python warnme.py warnme.py:4: UserWarning: oh noes!

[issue20131] warnings module offers no documented, programmatic way to reset "seen-warning" flag

2021-01-11 Thread Irit Katriel
Change by Irit Katriel : -- resolution: -> duplicate superseder: -> warnings module offers no documented, programmatic way to reset "seen-warning" flag ___ Python tracker

[issue20131] warnings module offers no documented, programmatic way to reset "seen-warning" flag

2020-03-18 Thread Brett Cannon
Change by Brett Cannon : -- nosy: -brett.cannon ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue20131] warnings module offers no documented, programmatic way to reset seen-warning flag

2014-01-10 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- stage: - test needed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20131 ___ ___ Python-bugs-list

[issue20131] warnings module offers no documented, programmatic way to reset seen-warning flag

2014-01-05 Thread Andreas Kloeckner
New submission from Andreas Kloeckner: For tests and doctests, it is often desirable to show or verify that a certain warning occurs. Unfortunately, if the warning has been hit previously, it will not be issued again. It would be great if there were a documented, unified way to reset this

[issue20131] warnings module offers no documented, programmatic way to reset seen-warning flag

2014-01-05 Thread Andreas Kloeckner
Changes by Andreas Kloeckner inf...@tiker.net: -- type: - enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20131 ___ ___

[issue20131] warnings module offers no documented, programmatic way to reset seen-warning flag

2014-01-05 Thread R. David Murray
R. David Murray added the comment: The easy answer for unittest is to use assertWarns. For versions where that doesn't exist you could implement the same technique yourself. Exposing a 'clear everything' function in the warnings module might not be a bad idea, but otherwise for doctest I'd