On Wednesday, May 31, 2006, at 03:06PM, Tim Peters <[EMAIL PROTECTED]> wrote: >> Would someone augment the warnings module to make testing >> more reasonable? > >What's required? I know of two things: > >1. There's no advertised way to save+restore the internal > filter list, or to remove a filter entry, so tests that want > to make a temporary change have to break into the internals. > >2. There's no advertised way to disable "only gripe once per source > line" behavior. This gets in the way of testing that warnings get > raised when running tests more than once, or using a common > function to raise warnings from multiple call sites. > >These get in the way of Zope and ZODB testing too, BTW. >Unfortunately, looks like the new test_struct code bumped into both of >them at once.
The really annoying part of the new struct warnings is that the warning line mentions a line in struct.py instead the caller of struct.pack. That makes it hard to find the source of the warning without telling the warnings module to raise an exception for DeprecationWarnings. Ronald _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com