[Zope-dev] zope.test.doctest made into monkey-patches (Was: Circular dependency hell.)

Lennart Regebro regebro at gmail.com
Tue Apr 20 04:46:47 EDT 2010


And here is another interesting experiment:

svn+ssh://regebro@svn.zope.org/repos/main/zope.testing/branches/regebro-doctest-patching

It replaces the custom doctest.py with monkey-patches.
I will report these to the Python bugtracker as well, although I have
no hope of getting them into Python 2.7. But that doesn't matter much.
:)

Benefits: We don't have to maintain a separate  doctest.py, and we get
the bugfixes from Python. We haven't merged from Python trunk since
2004, and there are LOADS AND LOADS of bugfixes done on the Python
doctest which we don't have. There are three bugfixes and two
"features" that we have that I now monkey patch in in this branch.

Drawbacks: If you import zope.testing.doctest, *all* your doctests
will belong to us, so if you have doctests that expect the bugs, your
out of luck. :)
Also, I do not monkey-patch in the footer parsing support. It's too
big, use Manuel instead if you need that.


If noone protests, I'll merge this into my "no testrunner branch",
make it support Python 3, and then merge that to trunk, maybe sometime
next week.

-- 
Lennart Regebro: http://regebro.wordpress.com/
Python 3 Porting: http://python-incompatibility.googlecode.com/
+33 661 58 14 64


More information about the Zope-Dev mailing list