Re: [Zope-dev] zope.testrunner and nose count doctests differently
On 11/3/11 12:13 PM, Chris Withers wrote: On 03/11/2011 11:05, Jim Fulton wrote: On Thu, Nov 3, 2011 at 5:14 AM, Chris Withersch...@simplistix.co.uk wrote: Hi Michael, On 03/11/2011 09:12, Michael Howitz wrote: Run both test runners with the option -vv to see which tests are run. (I did this for your code and the list of tests seems to be equal.) It would be interesting for the rest of us to know the length of that list. $ bin/test -m testfixtures.tests.test_docs -vv Running tests at level 1 Running zope.testrunner.layer.UnitTests tests: Set up zope.testrunner.layer.UnitTests in 0.000 seconds. Running: testfixtures/docs/api.txt testfixtures/docs/changes.txt testfixtures/docs/comparing.txt testfixtures/docs/components.txt testfixtures/docs/datetime.txt testfixtures/docs/description.txt testfixtures/docs/development.txt testfixtures/docs/exceptions.txt testfixtures/docs/files.txt testfixtures/docs/index.txt testfixtures/docs/installation.txt testfixtures/docs/license.txt testfixtures/docs/logging.txt testfixtures/docs/mocking.txt testfixtures/docs/streams.txt testfixtures/docs/utilities.txt Note that the above are 16 files ... Ran 316 tests with 0 failures and 0 errors in 0.150 seconds. ... containing what zope.testrunner considers 316 individual tests. Tearing down left over layers: Tear down zope.testrunner.layer.UnitTests in 0.000 seconds. $ bin/nosetests testfixtures/tests/test_docs.py -vv nose.config: INFO: Ignoring files matching ['^\\.', '^_', '^setup\\.py$'] testfixtures_nose/docs/api.txt ... ok testfixtures_nose/docs/changes.txt ... ok testfixtures_nose/docs/comparing.txt ... ok testfixtures_nose/docs/components.txt ... ok testfixtures_nose/docs/datetime.txt ... ok testfixtures_nose/docs/description.txt ... ok testfixtures_nose/docs/development.txt ... ok testfixtures_nose/docs/exceptions.txt ... ok testfixtures_nose/docs/files.txt ... ok testfixtures_nose/docs/index.txt ... ok testfixtures_nose/docs/installation.txt ... ok testfixtures_nose/docs/license.txt ... ok testfixtures_nose/docs/logging.txt ... ok testfixtures_nose/docs/mocking.txt ... ok testfixtures_nose/docs/streams.txt ... ok testfixtures_nose/docs/utilities.txt ... ok These are the same 16 files (I assume) that nose considers one test each irrespective of their content. The individual tests in there are run but not counted separately. Is it this what's confusing you? It certainly confused me when I noticed this for the first time. I'd even consider this a bug in node's reporting but never dared to file a ticket. Raphael -- Ran 16 tests in 0.141s My guess is that when you're using the zope testruner, you're somehow picking up zope.testing.doctest, which counts each doctest example as a test. The code uses Manuel, under both nose and zope.testrunner: from doctest import REPORT_NDIFF,ELLIPSIS from glob import glob from manuel import doctest,codeblock,capture from manuel.testing import TestSuite from os.path import dirname,join,pardir def test_suite(): m = doctest.Manuel(optionflags=REPORT_NDIFF|ELLIPSIS) m += codeblock.Manuel() m += capture.Manuel() return TestSuite( m, *glob(join(dirname(__file__),pardir,pardir,'docs','*.txt')) ) cheers, Chris ___ 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 )
Re: [Zope-dev] [Plone-developers] experimental.broken - Graceful handling of broken interfaces and components in the ZODB
On 11/7/11 10:36 AM, Malthe Borch wrote: On 7 November 2011 09:17, Ross Pattersonm...@rpatterson.net wrote: The intention of this package is to see if the implementation of broken object handling is correct and robust enough to merge into zope.interface and zope.component themselves. Is this the right approach? If not why and what would be better? How might this approach be improved? (removed plone-dev from cc). Isn't it symptom treatment though? Yes, it is but the symptom is severe and not uncommon. The problem Ross is addressing here just happens way too often in the real world to simply say Sorry, user error. Just my 2 cents, Raphael If you've got an add-on which adds marker interfaces to general objects, shouldn't that add-on remove – or no longer provide – those same interfaces when it's uninstalled? At least in Plone, you can easily query content objects providing a particular set of interfaces. I think it's a non-goal to be able to run a system without all the required software – which is how I understand it when you just do a hard remove of an add-on without a prior soft remove. \malthe ___ 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 ) ___ 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 )
Re: [Zope-dev] CSRF protection for z3c.form
On 4/6/11 7:43 PM, Roger wrote: [..] I think to protect the form is just a part of a concept. Another part must be to prevent to inject JavaScript in user generated content. If an application allows to post JS in a blog post or comment etc. it should be possible to use easydmx to read and re-use the secure form token. (not approved but should work) For that reason both CMF as well as Plone clean user input by stripping nasty tags and such - at least per default. Raphael One of my bigger concern is also that such a token will break a lot of our tests which whould force us to use custom non security token generating form classes. I'm fine in general for implement such a concept in z3c.form but it should be optional. Why not offer additional form classes or a mixin for support such token? Regards Roger Ineichen Laurence ___ 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 ) ___ 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 )
[Zope-dev] Re: more on stacked component registries
Chris Withers wrote: [..] Actually, it doesn't. The handling of __bases__ appears to be done in the functions of the mysterious zope.interface.ro module. (that ro thing takes the biscuit for obscure naming :-( ) Without having a clue my first guess would be that this means 'Resolution Order' as we have 'mro' (Method Resolution Order) and 'iro' (Interface Resolution Order) for instance. But I could be completely off track ;-) Raphael Am I off base here? If so, more info please! :-) ___ 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 )
[Zope-dev] Re: Undeprecation of manage_afterAdd and manage_beforeDelete?
Hanno Schlichting wrote: Hi. [..] Thoughts? +1 Raphael PS: ... not to mention the 700 add-ons that are out there for Plone alone ... Hanno ___ 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 ) ___ 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 )
[Zope-dev] Re: Site Error
AP Meyer wrote: Is this a known bug? Yes. But Dieter fixed in recently in CVS HEAD (I think) Raphael Working without automatic refresh is very unhandy ;-) thanks Andre ___ Zope-Dev maillist - [EMAIL PROTECTED] 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 )