[Zope-dev] Switching zope.testbrowser to webtest instead of mechanize

Brian Sutherland brian at vanguardistas.net
Tue Mar 5 15:10:27 UTC 2013


On Mon, Mar 04, 2013 at 08:40:23PM +0200, Andrey Lebedev wrote:
> Hello zope-dev,
> 
> As you may already know, there is an effort to port zope packages to
> Python 3 going on. As part of this effort we want to port
> zope.testbrowser.

Great! I'm very interested in this, I've also got an app which I'll
need to port to python3 at some time.

> Unfortunately, mechanize package, that zope.testbrowser depends on
> has no py3 support. There is an unfinished effort at [1], however,
> after closer examination of the codebase and state of the port, it
> seems more practical to switch internal implementation of
> zope.testbrowser to webtest.
> 
> So far, it seems webtest has all the features needed to do the
> switch. I started a branch at github ([2]) to track work in
> progress. The goal is to make most (say 80%) of existing tests to
> work without modifications under new implementation.

Looking at the branch, it seems that this is basically going to be a
re-write of the existing code. You're planning to keep the mechanize
backend available?

Might I suggest zope.testbrowser.webtest for the WebTest backed
testbrowser rather than zope.testbrowser.browser2?  Could you also keep
the tests for the mechanize testbrowser intact? They could be skipped if
mechanize is not importable and mechanize downgraded to an optional
dependency.

> [1] http://web.cecs.pdx.edu/~adevore/mechanize/
> [2] https://github.com/zopefoundation/zope.testbrowser/tree/webtest
> 
> -- 
> Andrey Lebedev aka -.- . -.. -.. . .-.
> Software engineer
> Homepage: http://lebedev.lt/
> Jabber ID: kedder at jabber.ru
> _______________________________________________
> Zope-Dev maillist  -  Zope-Dev at zope.org
> https://mail.zope.org/mailman/listinfo/zope-dev
> **  No cross posts or HTML encoding!  **
> (Related lists -
> https://mail.zope.org/mailman/listinfo/zope-announce
> https://mail.zope.org/mailman/listinfo/zope )

-- 
Brian Sutherland


More information about the Zope-Dev mailing list