On 16 December 2010 08:38, Brian Sutherland <br...@vanguardistas.net> wrote: > On Thu, Dec 16, 2010 at 12:06:36AM +0100, Hanno Schlichting wrote: >> On Wed, Dec 15, 2010 at 2:06 PM, Brian Sutherland >> <br...@vanguardistas.net> wrote: >> > I've managed to get the existing tests to run against this browser with >> > two new testing dependencies: >> > WebTest >> > zope.app.wsgi >> >> zope.app.wsgi shouldn't be a dependency of zope.testbrowser. It's ok >> if it's pulled in via a specific extra_requires like a [webtest] >> extra, though. Zope2 depends on zope.testbrowser and has no dependency >> on any zope.app packages - this must continue to be the case. Required >> test dependencies count towards real dependencies here. > > I understand your point, but the situation was already pretty nasty as > zope.testbrowser already depended on: > > zope.app.appsetup > zope.app.publication > zope.app.testing >= 3.8 > > I agree that any extra dependency is not welcome, but this feature opens > up a path to radically reducing the dependencies of zope.testbrowser. > See below. > >> The real fix would probably be to move the reusable code out of >> zope.app.wsgi into a zope.wsgi package, but that might be more than >> you are willing to do now. I do believe some of the Grok people would >> be interested in this as well. > > There is also another route open now with the addition of the webtest > feature. We could invert the zope.testbrowser -> zope.app.testing > dependency. > > This is a major re-factoring, but will leave the zope.testbrowser > dependencies looking like this: > > install_requires = [ > 'mechanize>=0.2.0', > 'setuptools', > 'zope.interface', > 'zope.schema', > 'pytz', > ], > extras_require = { > 'test': [ > 'WebOb', > 'WebTest', > ] > > Basically this would require: > > * Re-writing the zope.testbrowser.ftests test application as a pure > WSGI app (using WebOb) > * Test only against zope.testbrowser.wsgi and refactor tests to not > use features from zope.app.testing.functional > * Move zope.testbrowser.testing into zope.testbrowser.wsgi and > zope.app.testing.testbrowser > * Leave backwards compatibility imports in place in > zope.testbrowser.testing > > I'd be willing to have a look at this if Benji were OK in principle on > this and someone was willing to review it. > > -- > Brian Sutherland > _______________________________________________ > Zope-Dev maillist - zope-...@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 )
Hi Brian, I'd be happy to contribute to your zope.testbrowser refactoring. I am primarily interested from the perspective of grok and zope.app.wsgi. -- Jan-Jaap Driessen _______________________________________________ Zope-Dev maillist - Zope-Dev@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 )