On Tue, Dec 02, 2008 at 10:03:01PM +0100, Wichert Akkerman wrote:
> Previously Marius Gedminas wrote:
> > On Tue, Dec 02, 2008 at 02:04:39AM +0300, Dan Korostelev wrote:
> > > I just removed zope.testing from the zope.index dependency and
> > > replaced zope.testing.doctest imports with plain python doctest and it
> > > seems to work with python 2.4 and 2.5 here. Now, it only depends on
> > > ZODB3 and zope.interface, which is nice :) Is there any objections on
> > > this?
> > 
> > Yes.
> > 
> > Using 'import doctest' rather than 'from zope.testing import doctest'
> > was a pretty reliable way to break test.py --coverage, at least on
> > Python 2.4.
> 
> Isn't that a bug in test.py that should be fixed then?

AFAIU it's a bug in Python's doctest.py that's been fixed in Zope's
copy.  I believe it was fixed in a newer Python version.  Unfortunately,
I cannot find a reference to a bug.

All I remember is that I once spent a couple of days making sure test
coverage worked, and the last fix was going through the source tree and
replacing 'import doctest' with 'from zope.testing import doctest'.  It
was a long time ago, so I could be wrong about the Python version.  It
may have been 2.3's doctest.py that had the bug.  I just diffed Zope's
doctest.py with Python 2.4 and 2.5 versions, and I don't see anything
that looks like a fix for tracing.  (I see other differences, though,
like making sure a test's globs are preserved, and a whole new feature
flag INTERPRET_FOOTNOTES.)

Actually, I can look at svn logs...

  http://zope3.pov.lt/trac/changeset/28704
  http://zope3.pov.lt/trac/changeset/28705
  http://mail.zope.org/pipermail/zope3-dev/2004-December/012990.html

Yes, it was a bug in Python 2.3, and that fix is present in 2.4's
doctest.py.  Since we don't support 2.3 any more, I retract my objection
to plain 'import doctest' on the grounds of coverage.  Although people
should be aware of the other differences between Zope's doctest and
Python's doctest (unfortunate, that).

Marius Gedminas
-- 
C, n:
        A programming language that is sort of like Pascal except more like
        assembly except that it isn't very much like either one, or anything
        else.  It is either the best language available to the art today, or
        it isn't.
                -- Ray Simard

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Zope-Dev maillist  -  Zope-Dev@zope.org
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )

Reply via email to