Re: [Zope-dev] zeo server conflict resolving
Chris Withers wrote at 2006-6-5 14:54 +0100: > ... >Have you signed your new contributor agreement yet? ;-) I did not yet get an invitation... -- Dieter ___ 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 )
Re: [Zope-dev] zeo server conflict resolving
Dieter Maurer wrote: M. Krainer wrote at 2006-6-2 12:27 +0200: Forgot to mention that this was actually the first thing I tried. But it doesen't work, as the INSTANCE_HOME dir does also not show up in sys.path (in find_globals). A ZEO weakness, I fixed in our local copy this way: "runzeo.py": # DM: 2004-06-03 # activate Zope's INSTANCE_HOME magic. Have you signed your new contributor agreement yet? ;-) Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk ___ 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: [Zope-Checkins] SVN: Zope/trunk/lib/python/Products/PageTemplates/ Merged r68461 from 2.10 branch:
Have you read the discussion on the list about this? Backward compatibility? Third-party apps? Duh. On 5 Jun 2006, at 14:18, Chris Withers wrote: Out of interst, why not just make this change wherever empty tales expreessions have been used in the past? It'd be clearer as to what the intention was and remove the necessity for hacky code like this... cheers, Chris Florent Guillaume wrote: Log message for revision 68462: Merged r68461 from 2.10 branch: Empty TALES path expressions are allowed in Zope 2. http://www.zope.org/Collectors/Zope/2118 Changed: U Zope/trunk/lib/python/Products/PageTemplates/Expressions.py U Zope/trunk/lib/python/Products/PageTemplates/tests/ testExpressions.py -=- Modified: Zope/trunk/lib/python/Products/PageTemplates/Expressions.py === --- Zope/trunk/lib/python/Products/PageTemplates/Expressions.py 2006-06-02 15:02:15 UTC (rev 68461) +++ Zope/trunk/lib/python/Products/PageTemplates/Expressions.py 2006-06-02 15:04:12 UTC (rev 68462) @@ -99,6 +99,8 @@ class ZopePathExpr(PathExpr): def __init__(self, name, expr, engine): +if not expr.strip(): +expr = 'nothing' super(ZopePathExpr, self).__init__(name, expr, engine, boboAwareZopeTraverse) Modified: Zope/trunk/lib/python/Products/PageTemplates/tests/ testExpressions.py === --- Zope/trunk/lib/python/Products/PageTemplates/tests/ testExpressions.py 2006-06-02 15:02:15 UTC (rev 68461) +++ Zope/trunk/lib/python/Products/PageTemplates/tests/ testExpressions.py 2006-06-02 15:04:12 UTC (rev 68462) @@ -86,6 +86,15 @@ self.failUnless(isinstance(defer, DeferWrapper)) self.failUnless(isinstance(lazy, LazyWrapper)) +def test_empty_ZopePathExpr(self): +"""Test empty path expressions. +""" +ec = self.ec +self.assertEquals(ec.evaluate('path:'), None) +self.assertEquals(ec.evaluate('path: '), None) +self.assertEquals(ec.evaluate(''), None) +self.assertEquals(ec.evaluate(' \n'), None) + def test_suite(): return unittest.makeSuite(ExpressionTests) ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk -- Florent Guillaume, Nuxeo (Paris, France) Director of R&D +33 1 40 33 71 59 http://nuxeo.com [EMAIL PROTECTED] ___ 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: [Zope-Checkins] SVN: Zope/trunk/lib/python/Products/PageTemplates/ Merged r68461 from 2.10 branch:
Out of interst, why not just make this change wherever empty tales expreessions have been used in the past? It'd be clearer as to what the intention was and remove the necessity for hacky code like this... cheers, Chris Florent Guillaume wrote: Log message for revision 68462: Merged r68461 from 2.10 branch: Empty TALES path expressions are allowed in Zope 2. http://www.zope.org/Collectors/Zope/2118 Changed: U Zope/trunk/lib/python/Products/PageTemplates/Expressions.py U Zope/trunk/lib/python/Products/PageTemplates/tests/testExpressions.py -=- Modified: Zope/trunk/lib/python/Products/PageTemplates/Expressions.py === --- Zope/trunk/lib/python/Products/PageTemplates/Expressions.py 2006-06-02 15:02:15 UTC (rev 68461) +++ Zope/trunk/lib/python/Products/PageTemplates/Expressions.py 2006-06-02 15:04:12 UTC (rev 68462) @@ -99,6 +99,8 @@ class ZopePathExpr(PathExpr): def __init__(self, name, expr, engine): +if not expr.strip(): +expr = 'nothing' super(ZopePathExpr, self).__init__(name, expr, engine, boboAwareZopeTraverse) Modified: Zope/trunk/lib/python/Products/PageTemplates/tests/testExpressions.py === --- Zope/trunk/lib/python/Products/PageTemplates/tests/testExpressions.py 2006-06-02 15:02:15 UTC (rev 68461) +++ Zope/trunk/lib/python/Products/PageTemplates/tests/testExpressions.py 2006-06-02 15:04:12 UTC (rev 68462) @@ -86,6 +86,15 @@ self.failUnless(isinstance(defer, DeferWrapper)) self.failUnless(isinstance(lazy, LazyWrapper)) +def test_empty_ZopePathExpr(self): +"""Test empty path expressions. +""" +ec = self.ec +self.assertEquals(ec.evaluate('path:'), None) +self.assertEquals(ec.evaluate('path: '), None) +self.assertEquals(ec.evaluate(''), None) +self.assertEquals(ec.evaluate(' \n'), None) + def test_suite(): return unittest.makeSuite(ExpressionTests) ___ Zope-Checkins maillist - Zope-Checkins@zope.org http://mail.zope.org/mailman/listinfo/zope-checkins -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk ___ 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] Unittests with different zope configuration?
Does anyone know how to write unittests that have to deal with different configurations in zope.conf? In my particular case I need write some tests for sequence.sort() that deal with the 'locale' configuration in zope.conf. So how do I setup a different configurations in a unit test? Andreas pgpHVEyiImM3Z.pgp Description: PGP signature ___ 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 )