This has to do with lxml; it currently worksforme, but I don't know why. Try Stephan's static build and see if it fares any better, possibly using otool -L to confirm bindings.
\malthe On 2 June 2010 20:26, Chris Withers <ch...@simplistix.co.uk> wrote: > So, in an effort to create some tests for the chameleon.genshi problems I'm > having, I thought I'd run the current tests. > > On MacOSX this appears to fail for trunk right now. > > What am I doing wrong? > > Chris > > serato:chameleon chris$ svn info > Path: . > URL: http://svn.repoze.org/chameleon/trunk > Repository Root: http://svn.repoze.org > Repository UUID: 8f1d8bf8-68d2-4fbe-a113-2afb08c80ed9 > Revision: 9494 > Node Kind: directory > Schedule: normal > Last Changed Author: Wichert Akkerman <wich...@wiggy.net> > Last Changed Rev: 9493 > Last Changed Date: 2010-06-02 13:13:34 +0100 (Wed, 02 Jun 2010) > > serato:chameleon chris$ nose --version > -bash: nose: command not found > serato:chameleon chris$ ~/virtualenvs/repoze.bfg/bin/nosetests > .............F.......FFF.........F.F......E................ > ====================================================================== > ERROR: Failure: ImportError (No module named lxml.builder) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File > "/Users/chris/virtualenvs/repoze.bfg/lib/python2.6/site-packages/nose-0.11.3-py2.6.egg/nose/loader.py", > line 382, in loadTestsFromName > addr.filename, addr.module) > File > "/Users/chris/virtualenvs/repoze.bfg/lib/python2.6/site-packages/nose-0.11.3-py2.6.egg/nose/importer.py", > line 39, in importFromPath > return self.importFromDir(dir_path, fqname) > File > "/Users/chris/virtualenvs/repoze.bfg/lib/python2.6/site-packages/nose-0.11.3-py2.6.egg/nose/importer.py", > line 86, in importFromDir > mod = load_module(part_fqname, fh, filename, desc) > File "/Users/chris/LocalSVN/chameleon/src/chameleon/tests/test_i18nize.py", > line 3, in <module> > from lxml.builder import ElementMaker > ImportError: No module named lxml.builder > > ====================================================================== > FAIL: Doctest: template.txt > ---------------------------------------------------------------------- > Traceback (most recent call last): > File > "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/doctest.py", > line 2152, in runTest > raise self.failureException(self.format_failure(new.getvalue())) > AssertionError: Failed doctest test for template.txt > File "/Users/chris/LocalSVN/chameleon/src/chameleon/core/template.txt", > line 0 > > ---------------------------------------------------------------------- > File "/Users/chris/LocalSVN/chameleon/src/chameleon/core/template.txt", line > 73, in template.txt > Failed example: > print result > Expected: > <html xmlns="http://www.w3.org/1999/xhtml"> > <div xmlns:test="http://test/ns"> > <span test:attr="test">Hello, world!</span> > </div> > </html> > Got: > <html xmlns="http://www.w3.org/1999/xhtml"> > <BLANKLINE> > <div xmlns:test="http://test/ns"> > <span test:attr="test">Hello, world!</span> > </div> > None > </html> > > > ====================================================================== > FAIL: Doctest: i18n.txt > ---------------------------------------------------------------------- > Traceback (most recent call last): > File > "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/doctest.py", > line 2152, in runTest > raise self.failureException(self.format_failure(new.getvalue())) > AssertionError: Failed doctest test for i18n.txt > File "/Users/chris/LocalSVN/chameleon/src/chameleon/genshi/i18n.txt", line > 0 > > ---------------------------------------------------------------------- > File "/Users/chris/LocalSVN/chameleon/src/chameleon/genshi/i18n.txt", line > 16, in i18n.txt > Failed example: > from zope.i18n.simpletranslationdomain import SimpleTranslationDomain > Exception raised: > Traceback (most recent call last): > File > "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/doctest.py", > line 1248, in __run > compileflags, 1) in test.globs > File "<doctest i18n.txt[1]>", line 1, in <module> > from zope.i18n.simpletranslationdomain import SimpleTranslationDomain > ImportError: No module named i18n.simpletranslationdomain > ---------------------------------------------------------------------- > File "/Users/chris/LocalSVN/chameleon/src/chameleon/genshi/i18n.txt", line > 17, in i18n.txt > Failed example: > td = SimpleTranslationDomain("test", { > ("de", "test_msgid") : u"Mock translation of 'test_msgid'.", > ("de", "msg_id") : u"Mock translation of 'msg_id'.", > ("de", "tid") : u"Mock translation of 'tid'.", > ("de", "aid") : u"Mock translation of 'aid'.", > ("de", "Default") : u"Mock translation of 'Default'.", > ("de", "bananas") : u"Mock translation of ${count} bananas.", > ("de", "two_bananas"): u"Ich will ${bananas} Bananen und ${apples} > \xc4pfels.", > ("de", "month_may") : u"Mai", > ("de", "® <") : u"German ® <", > ("de", "The Dutch") : u"Die Hollander", > ("de", "missing_id") : u"missing_id", > ("nl", "size_advise"): u"${retailer} adviseert u ${size}.", > ("nl", "size_advise_suggestion"): u"maat ${size}", > }) > Exception raised: > Traceback (most recent call last): > File > "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/doctest.py", > line 1248, in __run > compileflags, 1) in test.globs > File "<doctest i18n.txt[2]>", line 1, in <module> > td = SimpleTranslationDomain("test", { > NameError: name 'SimpleTranslationDomain' is not defined > ---------------------------------------------------------------------- > File "/Users/chris/LocalSVN/chameleon/src/chameleon/genshi/i18n.txt", line > 32, in i18n.txt > Failed example: > component.provideUtility(td, name="test") > Exception raised: > Traceback (most recent call last): > File > "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/doctest.py", > line 1248, in __run > compileflags, 1) in test.globs > File "<doctest i18n.txt[3]>", line 1, in <module> > component.provideUtility(td, name="test") > NameError: name 'td' is not defined > ---------------------------------------------------------------------- > File "/Users/chris/LocalSVN/chameleon/src/chameleon/genshi/i18n.txt", line > 63, in i18n.txt > Failed example: > print template.render(target_language='de') > Expected: > <div xmlns="http://www.w3.org/1999/xhtml"> > <span>Mock translation of 'test_msgid'.</span> > </div> > Got: > <div xmlns="http://www.w3.org/1999/xhtml"> > <span> > Default > </span> > </div> > ---------------------------------------------------------------------- > File "/Users/chris/LocalSVN/chameleon/src/chameleon/genshi/i18n.txt", line > 90, in i18n.txt > Failed example: > print template.render(target_language='de') > Expected: > <div xmlns="http://www.w3.org/1999/xhtml"> > <span>Mock translation of 'Default'.</span> > </div> > Got: > <div xmlns="http://www.w3.org/1999/xhtml"> > <span> > Default > </span> > </div> > ---------------------------------------------------------------------- > File "/Users/chris/LocalSVN/chameleon/src/chameleon/genshi/i18n.txt", line > 113, in i18n.txt > Failed example: > print template.render(target_language='de') > Expected: > <div xmlns="http://www.w3.org/1999/xhtml"> > <p>Mock translation of <span>18</span> bananas.</p> > </div> > Got: > <div xmlns="http://www.w3.org/1999/xhtml"> > <p> > <span>18</span> bananas. > </p> > </div> > ---------------------------------------------------------------------- > File "/Users/chris/LocalSVN/chameleon/src/chameleon/genshi/i18n.txt", line > 142, in i18n.txt > Failed example: > print template.render(target_language='de') > Expected: > <div xmlns="http://www.w3.org/1999/xhtml"> > <span>Ich will <span>12</span> Bananen und <span>8</span> > \xc4pfels.</span> > </div> > Got: > <div xmlns="http://www.w3.org/1999/xhtml"> > <span> > I want <span>12</span> bananas and > <span>8</span> apples. > </span> > </div> > ---------------------------------------------------------------------- > File "/Users/chris/LocalSVN/chameleon/src/chameleon/genshi/i18n.txt", line > 173, in i18n.txt > Failed example: > print template.render(retailer=u"Esprit", size=u"XL", > target_language="nl") > Expected: > <div xmlns="http://www.w3.org/1999/xhtml"> > <span>Esprit adviseert u <strong>maat XL</strong>.</span> > </div> > Got: > <div xmlns="http://www.w3.org/1999/xhtml"> > <span> > Esprit recommends > <strong>size > XL</strong>. > </span> > </div> > ---------------------------------------------------------------------- > File "/Users/chris/LocalSVN/chameleon/src/chameleon/genshi/i18n.txt", line > 206, in i18n.txt > Failed example: > print template.render(year=year, monthname=monthname) > Expected: > <div xmlns="http://www.w3.org/1999/xhtml"> > May > 2008 > </div> > Got: > <div xmlns="http://www.w3.org/1999/xhtml"> > <BLANKLINE> > month_may > 2008 > <BLANKLINE> > </div> > ---------------------------------------------------------------------- > File "/Users/chris/LocalSVN/chameleon/src/chameleon/genshi/i18n.txt", line > 214, in i18n.txt > Failed example: > print template.render(year=year, monthname=monthname, > target_language='de') > Expected: > <div xmlns="http://www.w3.org/1999/xhtml"> > Mai > 2008 > </div> > Got: > <div xmlns="http://www.w3.org/1999/xhtml"> > <BLANKLINE> > month_may > 2008 > <BLANKLINE> > </div> > ---------------------------------------------------------------------- > File "/Users/chris/LocalSVN/chameleon/src/chameleon/genshi/i18n.txt", line > 257, in i18n.txt > Failed example: > print template.render(year=year, monthname=monthname, > target_language='de') > Expected: > <div xmlns="http://www.w3.org/1999/xhtml"> > German ® < > </div> > Got: > <div xmlns="http://www.w3.org/1999/xhtml"> > <BLANKLINE> > ® > < > <BLANKLINE> > </div> > ---------------------------------------------------------------------- > File "/Users/chris/LocalSVN/chameleon/src/chameleon/genshi/i18n.txt", line > 277, in i18n.txt > Failed example: > print template.render() > Expected: > <div xmlns="http://www.w3.org/1999/xhtml"> > <span></span> > </div> > Got: > <div xmlns="http://www.w3.org/1999/xhtml"> > <span>None</span> > None > </div> > ---------------------------------------------------------------------- > File "/Users/chris/LocalSVN/chameleon/src/chameleon/genshi/i18n.txt", line > 317, in i18n.txt > Failed example: > print template.render(target_language='de') > Expected: > <div xmlns="http://www.w3.org/1999/xhtml"> > Mock translation of 'msg_id'. > </div> > Got: > <div xmlns="http://www.w3.org/1999/xhtml"> > <BLANKLINE> > The book is on the <span>table</span> > </div> > ---------------------------------------------------------------------- > File "/Users/chris/LocalSVN/chameleon/src/chameleon/genshi/i18n.txt", line > 347, in i18n.txt > Failed example: > print template.render(target_language='de') > Expected: > <div xmlns="http://www.w3.org/1999/xhtml"> > <span title="Mock translation of 'Default'."> > Default > </span> > </div> > Got: > <div xmlns="http://www.w3.org/1999/xhtml"> > <span title="Default"> > Default > </span> > </div> > ---------------------------------------------------------------------- > File "/Users/chris/LocalSVN/chameleon/src/chameleon/genshi/i18n.txt", line > 377, in i18n.txt > Failed example: > print template.render(target_language='de') > Expected: > <div xmlns="http://www.w3.org/1999/xhtml"> > <span title="Mock translation of 'test_msgid'."> > Default > </span> > </div> > Got: > <div xmlns="http://www.w3.org/1999/xhtml"> > <span title="Simple Title"> > Default > </span> > </div> > ---------------------------------------------------------------------- > File "/Users/chris/LocalSVN/chameleon/src/chameleon/genshi/i18n.txt", line > 407, in i18n.txt > Failed example: > print template.render(target_language='de') > Expected: > <div xmlns="http://www.w3.org/1999/xhtml"> > <span title="Mock translation of 'test_msgid'."> > Default > </span> > </div> > Got: > <div xmlns="http://www.w3.org/1999/xhtml"> > <span title="Simple Title"> > Default > </span> > </div> > ---------------------------------------------------------------------- > File "/Users/chris/LocalSVN/chameleon/src/chameleon/genshi/i18n.txt", line > 438, in i18n.txt > Failed example: > print template.render(target_language='de') > Expected: > <div xmlns="http://www.w3.org/1999/xhtml"> > <span title="Mock translation of 'test_msgid'." longdesc="Mock > translation of 'Default'."> > Default > </span> > </div> > Got: > <div xmlns="http://www.w3.org/1999/xhtml"> > <span title="Simple Title" longdesc="A not so short description."> > Default > </span> > </div> > ---------------------------------------------------------------------- > File "/Users/chris/LocalSVN/chameleon/src/chameleon/genshi/i18n.txt", line > 485, in i18n.txt > Failed example: > print template.render(target_language='de') > Expected: > <div xmlns="http://www.w3.org/1999/xhtml"> > <span title="Mock translation of 'aid'.">Mock translation of > 'tid'.</span> > <span>Mock translation of 'tid'.</span> > <span>Mock translation of 'tid'.</span> > <span>Mock translation of 'tid'.</span> > </div> > Got: > <div xmlns="http://www.w3.org/1999/xhtml"> > <span title="Title"> > Default, "default", 'default' > </span> > <span>tid</span> > <span>tid</span> > <span>tid</span> > </div> > ---------------------------------------------------------------------- > File "/Users/chris/LocalSVN/chameleon/src/chameleon/genshi/i18n.txt", line > 536, in i18n.txt > Failed example: > print template.render(who=who, target_language='de') > Expected: > <div xmlns="http://www.w3.org/1999/xhtml"> > <span>Die Hollander</span> > </div> > Got: > <div xmlns="http://www.w3.org/1999/xhtml"> > <span>The Dutch</span> > </div> > ---------------------------------------------------------------------- > File "/Users/chris/LocalSVN/chameleon/src/chameleon/genshi/i18n.txt", line > 558, in i18n.txt > Failed example: > print template(who=who, target_language='de') > Expected: > <div xmlns="http://www.w3.org/1999/xhtml"> > <span>Die Hollander</span> > </div> > Got: > <div xmlns="http://www.w3.org/1999/xhtml"> > <span>The Dutch</span> > </div> > ---------------------------------------------------------------------- > File "/Users/chris/LocalSVN/chameleon/src/chameleon/genshi/i18n.txt", line > 577, in i18n.txt > Failed example: > print template.render(who=who, target_language='de') > Expected: > <div xmlns="http://www.w3.org/1999/xhtml"> > <span>Die Hollander</span> > </div> > Got: > <div xmlns="http://www.w3.org/1999/xhtml"> > <span>The Dutch</span> > </div> > > > ====================================================================== > FAIL: Doctest: language.txt > ---------------------------------------------------------------------- > Traceback (most recent call last): > File > "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/doctest.py", > line 2152, in runTest > raise self.failureException(self.format_failure(new.getvalue())) > AssertionError: Failed doctest test for language.txt > File "/Users/chris/LocalSVN/chameleon/src/chameleon/genshi/language.txt", > line 0 > > ---------------------------------------------------------------------- > File "/Users/chris/LocalSVN/chameleon/src/chameleon/genshi/language.txt", > line 263, in language.txt > Failed example: > print render("""\ > <div xmlns="http://www.w3.org/1999/xhtml" > xmlns:py="http://genshi.edgewall.org/"> > <span py:match=".//greeting"> > Hello, ${select('@name')[0]}! > </span> > <py:match path=".//farewell"> > <span>goodbye, ${select('@name')[0]}!</span> > </py:match> > <greeting name="${'dude'}" /> and > <farewell name="${'dude'}" /> > <farewell py:if="0" name="${'nemo'}" /> > </div>""") > Exception raised: > Traceback (most recent call last): > File > "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/doctest.py", > line 1248, in __run > compileflags, 1) in test.globs > File "<doctest language.txt[16]>", line 13, in <module> > </div>""") > File "<doctest language.txt[2]>", line 7, in render > return mt.process(result) > File > "/Users/chris/LocalSVN/chameleon/src/chameleon/genshi/language.py", line 70, > in process > raise ImportError("lxml.html") > ImportError: lxml.html > > > ====================================================================== > FAIL: Doctest: template.txt > ---------------------------------------------------------------------- > Traceback (most recent call last): > File > "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/doctest.py", > line 2152, in runTest > raise self.failureException(self.format_failure(new.getvalue())) > AssertionError: Failed doctest test for template.txt > File "/Users/chris/LocalSVN/chameleon/src/chameleon/genshi/template.txt", > line 0 > > ---------------------------------------------------------------------- > File "/Users/chris/LocalSVN/chameleon/src/chameleon/genshi/template.txt", > line 54, in template.txt > Failed example: > print GenshiTemplate("""\ > <div xmlns="http://www.w3.org/1999/xhtml" > xmlns:py="http://genshi.edgewall.org/"> > <py:match path=".//greeting">Hello, ${select('@name')[0]}</py:match> > <greeting name="${'World'.lower()}" />! > </div> > """)() > Exception raised: > Traceback (most recent call last): > File > "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/doctest.py", > line 1248, in __run > compileflags, 1) in test.globs > File "<doctest template.txt[15]>", line 7, in <module> > """)() > File "/Users/chris/LocalSVN/chameleon/src/chameleon/core/template.py", > line 95, in __call__ > return self.render(**kwargs) > File > "/Users/chris/LocalSVN/chameleon/src/chameleon/genshi/template.py", line 19, > in render > return mt.process(result) > File > "/Users/chris/LocalSVN/chameleon/src/chameleon/genshi/language.py", line 70, > in process > raise ImportError("lxml.html") > ImportError: lxml.html > ---------------------------------------------------------------------- > File "/Users/chris/LocalSVN/chameleon/src/chameleon/genshi/template.txt", > line 75, in template.txt > Failed example: > print template1() > Exception raised: > Traceback (most recent call last): > File > "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/doctest.py", > line 1248, in __run > compileflags, 1) in test.globs > File "<doctest template.txt[18]>", line 1, in <module> > print template1() > File "/Users/chris/LocalSVN/chameleon/src/chameleon/core/template.py", > line 95, in __call__ > return self.render(**kwargs) > File "/Users/chris/LocalSVN/chameleon/src/chameleon/core/template.py", > line 361, in render > return super(TemplateFile, self).render(*args, **kwargs) > File > "/Users/chris/LocalSVN/chameleon/src/chameleon/genshi/template.py", line 19, > in render > return mt.process(result) > File > "/Users/chris/LocalSVN/chameleon/src/chameleon/genshi/language.py", line 70, > in process > raise ImportError("lxml.html") > ImportError: lxml.html > ---------------------------------------------------------------------- > File "/Users/chris/LocalSVN/chameleon/src/chameleon/genshi/template.txt", > line 122, in template.txt > Failed example: > print GenshiTemplate("""\ > <html xmlns="http://www.w3.org/1999/xhtml" > xmlns:i18n="http://xml.zope.org/namespaces/i18n"> > <py:def function="func"> > <strong i18n:translate="string1">Text <br > i18n:name="newline"/>text</strong> > </py:def> > ${func()} > </html>""")() > Expected: > <html xmlns="http://www.w3.org/1999/xhtml"> > <strong>Text <br />text</strong> > </html> > Got: > <html xmlns="http://www.w3.org/1999/xhtml"> > <BLANKLINE> > <strong>Text <br />text</strong> > None > </html> > > > ====================================================================== > FAIL: Doctest: i18n.txt > ---------------------------------------------------------------------- > Traceback (most recent call last): > File > "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/doctest.py", > line 2152, in runTest > raise self.failureException(self.format_failure(new.getvalue())) > AssertionError: Failed doctest test for i18n.txt > File "/Users/chris/LocalSVN/chameleon/src/chameleon/zpt/i18n.txt", line 0 > > ---------------------------------------------------------------------- > File "/Users/chris/LocalSVN/chameleon/src/chameleon/zpt/i18n.txt", line 64, > in i18n.txt > Failed example: > from zope.i18n.interfaces import ITranslationDomain > Exception raised: > Traceback (most recent call last): > File > "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/doctest.py", > line 1248, in __run > compileflags, 1) in test.globs > File "<doctest i18n.txt[8]>", line 1, in <module> > from zope.i18n.interfaces import ITranslationDomain > ImportError: No module named i18n.interfaces > ---------------------------------------------------------------------- > File "/Users/chris/LocalSVN/chameleon/src/chameleon/zpt/i18n.txt", line 65, > in i18n.txt > Failed example: > class MockTranslationDomain(object): > interface.implements(ITranslationDomain) > > def translate(self, msgid, mapping=None, context=None, > target_language=None, default=None): > if target_language != 'de': > return default > > mock ="Mock translation of '%s'" % \ > utils.htmlescape(msgid) > if mapping: > mock += ' mapping=%s' % mapping > return mock + '.' > Exception raised: > Traceback (most recent call last): > File > "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/doctest.py", > line 1248, in __run > compileflags, 1) in test.globs > File "<doctest i18n.txt[9]>", line 1, in <module> > class MockTranslationDomain(object): > File "<doctest i18n.txt[9]>", line 2, in MockTranslationDomain > interface.implements(ITranslationDomain) > NameError: name 'ITranslationDomain' is not defined > ---------------------------------------------------------------------- > File "/Users/chris/LocalSVN/chameleon/src/chameleon/zpt/i18n.txt", line 80, > in i18n.txt > Failed example: > component.provideUtility(MockTranslationDomain(), ITranslationDomain, > name="test") > Exception raised: > Traceback (most recent call last): > File > "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/doctest.py", > line 1248, in __run > compileflags, 1) in test.globs > File "<doctest i18n.txt[11]>", line 1, in <module> > component.provideUtility(MockTranslationDomain(), ITranslationDomain, > name="test") > NameError: name 'MockTranslationDomain' is not defined > ---------------------------------------------------------------------- > File "/Users/chris/LocalSVN/chameleon/src/chameleon/zpt/i18n.txt", line 87, > in i18n.txt > Failed example: > print template.render(target_language='de') > Expected: > <div xmlns="http://www.w3.org/1999/xhtml"> > <span>Mock translation of 'msgid'.</span> > </div> > Got: > <div xmlns="http://www.w3.org/1999/xhtml"> > <span>Default</span> > </div> > ---------------------------------------------------------------------- > File "/Users/chris/LocalSVN/chameleon/src/chameleon/zpt/i18n.txt", line 114, > in i18n.txt > Failed example: > print template.render(target_language='de') > Expected: > <div xmlns="http://www.w3.org/1999/xhtml"> > <span>Mock translation of 'Default'.</span> > </div> > Got: > <div xmlns="http://www.w3.org/1999/xhtml"> > <span> > Default > </span> > </div> > ---------------------------------------------------------------------- > File "/Users/chris/LocalSVN/chameleon/src/chameleon/zpt/i18n.txt", line 143, > in i18n.txt > Failed example: > print template.render(target_language='de') > Expected: > <div xmlns="http://www.w3.org/1999/xhtml"> > <p>Mock translation of '${count} bananas.' > mapping={'count': u'<span>18</span>'}.</p> > <p> > <span>18</span> bananas. > </p> > </div> > Got: > <div xmlns="http://www.w3.org/1999/xhtml"> > <p> > <span>18</span> bananas. > </p> > <p> > <span>18</span> bananas. > </p> > </div> > ---------------------------------------------------------------------- > File "/Users/chris/LocalSVN/chameleon/src/chameleon/zpt/i18n.txt", line 176, > in i18n.txt > Failed example: > print template.render(target_language='de') > Expected: > <div xmlns="http://www.w3.org/1999/xhtml"> > <span>Mock translation of 'I want ${bananas} bananas and ${apples} > apples.' > mapping={'bananas': u'<span>12</span>', 'apples': > u'<span>8</span>'}.</span> > </div> > Got: > <div xmlns="http://www.w3.org/1999/xhtml"> > <span> > I want <span>12</span> bananas and > <span>8</span> apples. > </span> > </div> > ---------------------------------------------------------------------- > File "/Users/chris/LocalSVN/chameleon/src/chameleon/zpt/i18n.txt", line 210, > in i18n.txt > Failed example: > print template.render(year=year, monthname=monthname) > Expected: > <div xmlns="http://www.w3.org/1999/xhtml"> > November > 2008 > </div> > Got: > <div xmlns="http://www.w3.org/1999/xhtml"> > <BLANKLINE> > month_nov > 2008 > <BLANKLINE> > </div> > ---------------------------------------------------------------------- > File "/Users/chris/LocalSVN/chameleon/src/chameleon/zpt/i18n.txt", line 218, > in i18n.txt > Failed example: > print template.render(year=year, monthname=monthname, > target_language='de') > Expected: > <div xmlns="http://www.w3.org/1999/xhtml"> > Mock translation of 'month_nov'. > 2008 > </div> > Got: > <div xmlns="http://www.w3.org/1999/xhtml"> > <BLANKLINE> > month_nov > 2008 > <BLANKLINE> > </div> > ---------------------------------------------------------------------- > File "/Users/chris/LocalSVN/chameleon/src/chameleon/zpt/i18n.txt", line 261, > in i18n.txt > Failed example: > print template.render(year=year, monthname=monthname, > target_language='de') > Expected: > <div xmlns="http://www.w3.org/1999/xhtml"> > Mock translation of '® <'. > </div> > Got: > <div xmlns="http://www.w3.org/1999/xhtml"> > <BLANKLINE> > ® > < > <BLANKLINE> > </div> > ---------------------------------------------------------------------- > File "/Users/chris/LocalSVN/chameleon/src/chameleon/zpt/i18n.txt", line 281, > in i18n.txt > Failed example: > print template.render() > Expected: > <div xmlns="http://www.w3.org/1999/xhtml"> > <span></span> > </div> > Got: > <div xmlns="http://www.w3.org/1999/xhtml"> > <span>None</span> > None > </div> > ---------------------------------------------------------------------- > File "/Users/chris/LocalSVN/chameleon/src/chameleon/zpt/i18n.txt", line 316, > in i18n.txt > Failed example: > print template.render() > Expected: > <div xmlns="http://www.w3.org/1999/xhtml"> > <span> > The <b>book</b> is on the <span>desk</span>. > </span> > </div> > Got: > <div xmlns="http://www.w3.org/1999/xhtml"> > <span> > The <b>book</b> is on the ${place}. > </span> > </div> > ---------------------------------------------------------------------- > File "/Users/chris/LocalSVN/chameleon/src/chameleon/zpt/i18n.txt", line 339, > in i18n.txt > Failed example: > print template.render(target_language='de') > Expected: > <div xmlns="http://www.w3.org/1999/xhtml"> > Mock translation of 'msg_id'. > </div> > Got: > <div xmlns="http://www.w3.org/1999/xhtml"> > <BLANKLINE> > The book is on the <span>table</span> > </div> > ---------------------------------------------------------------------- > File "/Users/chris/LocalSVN/chameleon/src/chameleon/zpt/i18n.txt", line 417, > in i18n.txt > Failed example: > print template.render(target_language='de') > Expected: > <div xmlns="http://www.w3.org/1999/xhtml"> > <span title="Mock translation of 'Simple Title'."> > Default > </span> > </div> > Got: > <div xmlns="http://www.w3.org/1999/xhtml"> > <span title="Simple Title"> > Default > </span> > </div> > ---------------------------------------------------------------------- > File "/Users/chris/LocalSVN/chameleon/src/chameleon/zpt/i18n.txt", line 447, > in i18n.txt > Failed example: > print template.render(target_language='de') > Expected: > <div xmlns="http://www.w3.org/1999/xhtml"> > <span title="Mock translation of 'title_simple'."> > Default > </span> > </div> > Got: > <div xmlns="http://www.w3.org/1999/xhtml"> > <span title="Simple Title"> > Default > </span> > </div> > ---------------------------------------------------------------------- > File "/Users/chris/LocalSVN/chameleon/src/chameleon/zpt/i18n.txt", line 477, > in i18n.txt > Failed example: > print template.render(target_language='de') > Expected: > <div xmlns="http://www.w3.org/1999/xhtml"> > <span title="Mock translation of 'title_simple'."> > Default > </span> > </div> > Got: > <div xmlns="http://www.w3.org/1999/xhtml"> > <span title="Simple Title"> > Default > </span> > </div> > ---------------------------------------------------------------------- > File "/Users/chris/LocalSVN/chameleon/src/chameleon/zpt/i18n.txt", line 508, > in i18n.txt > Failed example: > print template.render(target_language='de') > Expected: > <div xmlns="http://www.w3.org/1999/xhtml"> > <span title="Mock translation of 'title_simple'." > longdesc="Mock translation of 'desc_short'."> > Default > </span> > </div> > Got: > <div xmlns="http://www.w3.org/1999/xhtml"> > <span title="Simple Title" longdesc="A not so short description."> > Default > </span> > </div> > ---------------------------------------------------------------------- > File "/Users/chris/LocalSVN/chameleon/src/chameleon/zpt/i18n.txt", line 532, > in i18n.txt > Failed example: > print template.render(target_language='de', monthname=monthname) > Expected: > <div xmlns="http://www.w3.org/1999/xhtml"> > <div title="Mock translation of 'month_nov'."> > <img alt="Mock translation of 'month_nov'." src="#" /> > <img alt="Mock translation of 'month_nov'." src="#" /> > <img alt="not translated: month_nov" src="#" /> > </div> > </div> > Got: > <div xmlns="http://www.w3.org/1999/xhtml"> > <div title="month_nov"> > <img alt="month_nov" src="#" /> > <img alt="month_nov" src="#" /> > <img alt="not translated: month_nov" src="#" /> > </div> > </div> > ---------------------------------------------------------------------- > File "/Users/chris/LocalSVN/chameleon/src/chameleon/zpt/i18n.txt", line 581, > in i18n.txt > Failed example: > print template.render(target_language='de') > Expected: > <div xmlns="http://www.w3.org/1999/xhtml"> > <span title="Mock translation of 'aid'.">Mock translation of > 'tid'.</span> > <span>Mock translation of 'tid'.</span> > <span>Mock translation of 'tid'.</span> > <span>Mock translation of 'tid'.</span> > </div> > Got: > <div xmlns="http://www.w3.org/1999/xhtml"> > <span title="Title"> > Default, "default", 'default' > </span> > <span>tid</span> > <span>tid</span> > <span>tid</span> > </div> > ---------------------------------------------------------------------- > File "/Users/chris/LocalSVN/chameleon/src/chameleon/zpt/i18n.txt", line 626, > in i18n.txt > Failed example: > print template.render(target_language='de') > Expected: > <div xmlns="http://www.w3.org/1999/xhtml"> > <span>Mock translation of '%'.</span> > <span>Mock translation of '%'.</span> > </div> > Got: > <div xmlns="http://www.w3.org/1999/xhtml"> > <span>%</span> > <span>default</span> > </div> > ---------------------------------------------------------------------- > File "/Users/chris/LocalSVN/chameleon/src/chameleon/zpt/i18n.txt", line 657, > in i18n.txt > Failed example: > print template.render(target_language='de') > Expected: > <div xmlns="http://www.w3.org/1999/xhtml"> > <span title="Mock translation of 'Espa\xf1ol'."> > Default > </span> > </div> > Got: > <div xmlns="http://www.w3.org/1999/xhtml"> > <span title="Espa\xf1ol"> > Default > </span> > </div> > ---------------------------------------------------------------------- > File "/Users/chris/LocalSVN/chameleon/src/chameleon/zpt/i18n.txt", line 687, > in i18n.txt > Failed example: > print template.render(who=who, target_language='de') > Expected: > <div xmlns="http://www.w3.org/1999/xhtml"> > <span>Mock translation of 'The Dutch'.</span> > </div> > Got: > <div xmlns="http://www.w3.org/1999/xhtml"> > <span>The Dutch</span> > </div> > ---------------------------------------------------------------------- > File "/Users/chris/LocalSVN/chameleon/src/chameleon/zpt/i18n.txt", line 709, > in i18n.txt > Failed example: > print template(who=who, target_language='de') > Expected: > <div xmlns="http://www.w3.org/1999/xhtml"> > <span>Mock translation of 'The Dutch'.</span> > </div> > Got: > <div xmlns="http://www.w3.org/1999/xhtml"> > <span>The Dutch</span> > </div> > > > ====================================================================== > FAIL: Doctest: template.txt > ---------------------------------------------------------------------- > Traceback (most recent call last): > File > "/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/doctest.py", > line 2152, in runTest > raise self.failureException(self.format_failure(new.getvalue())) > AssertionError: Failed doctest test for template.txt > File "/Users/chris/LocalSVN/chameleon/src/chameleon/zpt/template.txt", line > 0 > > ---------------------------------------------------------------------- > File "/Users/chris/LocalSVN/chameleon/src/chameleon/zpt/template.txt", line > 82, in template.txt > Failed example: > print main() > Expected: > <?xml version="1.0" encoding="UTF-8" standalone="no" ?> > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> > <html xmlns="http://www.w3.org/1999/xhtml" > template-macros="master" macros="master"> > Who are you, foo? > <span template-macros="master" macros="master"> > <!-- demonstrate difference between > `template` and `macros` symbol --> > </span> > </html> > Got: > <?xml version="1.0" encoding="UTF-8" standalone="no" ?> > <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> > <html xmlns="http://www.w3.org/1999/xhtml" template-macros="master" > macros="master"> > Who are you, foo? > None > <span template-macros="master" macros="master"> > <!-- demonstrate difference between > `template` and `macros` symbol --> > </span> > <BLANKLINE> > </html> > > > ---------------------------------------------------------------------- > Ran 59 tests in 5.445s > > FAILED (errors=1, failures=6) > > -- > Simplistix - Content Management, Batch Processing & Python Consulting > - http://www.simplistix.co.uk > -- Malthe Borch Technical Advisor UNICEF Uganda +256 (0) 703 945 965 _______________________________________________ Repoze-dev mailing list Repoze-dev@lists.repoze.org http://lists.repoze.org/listinfo/repoze-dev