On Sunday 10 April 2005 18:57, Tim Peters wrote:
> > Right, I know about this. Mmh, in fact, it surprises me now that my
> > deprecation module doctests do not complain in the second run. It is
> > probably one of the advantages of doc file tests, since their module gets
> > regenerated for every test run, so that the deprecation framework does
> > not detect the warning duplication.
> That probably accounts for it.  warnings.py does a truly horrid thing
> to detect duplicates:  when a warning is first raised in module M, it
> creates a "secret" M.__warningregistry__ attribute, to record all
> warnings (text, category, and line number) ever raised in M.  If M
> goes away, so does the record of the warnings it raised.

Another reason to write doc tests. :-)

Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
Zope3-dev mailing list
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to