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

Andrey Lebedev andrey.lebedev at gmail.com
Tue Mar 5 15:56:54 UTC 2013


On 03/05/2013 05:10 PM, Brian Sutherland wrote:
>> 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.

Yes, it is a re-write, but not re-write from scratch. I use existing 
code as much as possible.

> You're planning to keep the mechanize backend available?

Initially we didn't plan to keep mechanize. I think it would add an 
unjustified burden of choice to users (which backend to pick, if they 
work the same way?) and mechanize backend will/may not work in python3 
anyway.

The question of how compatible the webtest-based implementation will be, 
is still an open one though. However, we have a big real-world project 
to test compatibility against.


> Might I suggest zope.testbrowser.webtest for the WebTest backed
> testbrowser rather than zope.testbrowser.browser2?

I admit there is a bit of mess right now in the branch as I need to 
preserve existing code to copy when applicable. My plan is to rename 
z.t.browser2 to z.t.browser eventually, so it is not a final name.


> 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.

Again, if the compatibility of new implementation is proven to be "good 
enough", I see no reason to keep mechanize around. I might miss some 
important reasons, though.


-- 
Andrey Lebedev aka -.- . -.. -.. . .-.
Software engineer
Homepage: http://lebedev.lt/
Jabber ID: kedder at jabber.ru


More information about the Zope-Dev mailing list