[Python-Dev] test_struct failure on 64 bit platforms (original) (raw)

Ronald Oussoren ronaldoussoren at mac.com
Wed May 31 16:05:55 CEST 2006


On Wednesday, May 31, 2006, at 03:06PM, Tim Peters <tim.peters at gmail.com> 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 teststruct 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



More information about the Python-Dev mailing list