Skip to content

Instantly share code, notes, and snippets.

@ale-rt
Last active December 28, 2015 05:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ale-rt/7451855 to your computer and use it in GitHub Desktop.
Save ale-rt/7451855 to your computer and use it in GitHub Desktop.

If you got this error:

kees@zeno:~/Projects/buildout.coredev$ xvfb-run ./bin/test -m Products.CMFPlone
Running Products.CMFPlone.testing.CMFPloneLayer:Functional tests:
  Set up plone.testing.zca.LayerCleanup in 0.000 seconds.
  Set up plone.testing.z2.Startup in 0.147 seconds.
  Set up plone.app.testing.layers.PloneFixture in 5.623 seconds.
  Set up plone.app.event.testing.PAEventLayer in 0.562 seconds.
  Set up plone.app.contenttypes.testing.PloneAppContenttypes in 1.353 seconds.
  Set up Products.CMFPlone.testing.ProductsCMFPloneLayer in 0.078 seconds.
  Set up Products.CMFPlone.testing.CMFPloneLayer:Functional in 0.000 seconds.
  Running:
                  
  Ran 28 tests with 0 failures and 0 errors in 11.630 seconds.
Running plone.app.testing.bbb.PloneTestCase:Functional tests:
  Tear down Products.CMFPlone.testing.CMFPloneLayer:Functional in 0.000 seconds.
  Tear down Products.CMFPlone.testing.ProductsCMFPloneLayer in 0.019 seconds.
  Tear down plone.app.contenttypes.testing.PloneAppContenttypes in 0.079 seconds.
  Tear down plone.app.event.testing.PAEventLayer in 0.004 seconds.
  Set up plone.app.testing.bbb.PloneTestCaseFixture in 1.853 seconds.
  Set up plone.app.testing.bbb.PloneTestCase:Functional in 0.000 seconds.
  Running:
    353/922 (38.3%)/home/kees/.buildout/eggs/Products.CMFCore-2.2.7-py2.7.egg/Products/CMFCore/DirectoryView.py:493: UserWarning: DirectoryView classic_ecmascript refers to a non-existing path 'plonetheme.classic:skins/classic_ecmascript'
  (self.id, reg_key), UserWarning)
    832/922 (90.2%)

Failure in test testMixedModeQuery (Products.CMFPlone.tests.testUnicodeSplitter.TestQuery)
Traceback (most recent call last):
  File "/usr/lib/python2.7/unittest/case.py", line 331, in run
    testMethod()
  File "/home/kees/Projects/buildout.coredev/src/Products.CMFPlone/Products/CMFPlone/tests/testUnicodeSplitter.py", line 212, in testMixedModeQuery
    self.assertEqual(len(brains), 1)
  File "/usr/lib/python2.7/unittest/case.py", line 515, in assertEqual
    assertion_func(first, second, msg=msg)
  File "/usr/lib/python2.7/unittest/case.py", line 508, in _baseAssertEqual
    raise self.failureException(msg)
AssertionError: 0 != 1

                    
  Ran 922 tests with 1 failures and 0 errors in 2 minutes 40.695 seconds.
Running plone.testing.z2.ZServer:Functional tests:
  Tear down plone.app.testing.bbb.PloneTestCase:Functional in 0.000 seconds.
  Tear down plone.app.testing.bbb.PloneTestCaseFixture in 0.007 seconds.
  Tear down plone.app.testing.layers.PloneFixture in 0.045 seconds.
  Set up plone.testing.z2.ZServer in 0.502 seconds.
  Set up plone.testing.z2.ZServer:Functional in 0.000 seconds.
  Running:
                    
  Ran 63 tests with 0 failures and 0 errors in 0.216 seconds.
Running plone.testing.zca.UnitTesting tests:
  Tear down plone.testing.z2.ZServer:Functional in 0.000 seconds.
  Tear down plone.testing.z2.ZServer in 4.526 seconds.
  Tear down plone.testing.z2.Startup in 0.009 seconds.
  Tear down plone.testing.zca.LayerCleanup in 0.006 seconds.
  Set up plone.testing.zca.UnitTesting in 0.000 seconds.
  Running:
                  
  Ran 12 tests with 0 failures and 0 errors in 0.019 seconds.
Running zope.testing.testrunner.layer.UnitTests tests:
  Tear down plone.testing.zca.UnitTesting in 0.000 seconds.
  Set up zope.testing.testrunner.layer.UnitTests in 0.000 seconds.
  Running:
    79/93 (84.9%) 

Failure in test testNormalizeLatin1 (Products.CMFPlone.tests.testUnicodeSplitter.TestCaseNormalizer)
Traceback (most recent call last):
  File "/usr/lib/python2.7/unittest/case.py", line 331, in run
    testMethod()
  File "/home/kees/Projects/buildout.coredev/src/Products.CMFPlone/Products/CMFPlone/tests/testUnicodeSplitter.py", line 127, in testNormalizeLatin1
    self.assertEqual(self.process(input), output)
  File "/usr/lib/python2.7/unittest/case.py", line 515, in assertEqual
    assertion_func(first, second, msg=msg)
  File "/usr/lib/python2.7/unittest/case.py", line 744, in assertListEqual
    self.assertSequenceEqual(list1, list2, msg, seq_type=list)
  File "/usr/lib/python2.7/unittest/case.py", line 726, in assertSequenceEqual
    self.fail(msg)
  File "/usr/lib/python2.7/unittest/case.py", line 412, in fail
    raise self.failureException(msg)
AssertionError: Lists differ: ['\xc4ffin'] != ['\xe4ffin']

First differing element 0:
�ffin
�ffin

- ['\xc4ffin']
?     ^

+ ['\xe4ffin']
?     ^


    82/93 (88.2%)

Failure in test testProcessLatin1 (Products.CMFPlone.tests.testUnicodeSplitter.TestSplitter)
Traceback (most recent call last):
  File "/usr/lib/python2.7/unittest/case.py", line 331, in run
    testMethod()
  File "/home/kees/Projects/buildout.coredev/src/Products.CMFPlone/Products/CMFPlone/tests/testUnicodeSplitter.py", line 94, in testProcessLatin1
    self.assertEqual(self.process(input), output)
  File "/usr/lib/python2.7/unittest/case.py", line 515, in assertEqual
    assertion_func(first, second, msg=msg)
  File "/usr/lib/python2.7/unittest/case.py", line 744, in assertListEqual
    self.assertSequenceEqual(list1, list2, msg, seq_type=list)
  File "/usr/lib/python2.7/unittest/case.py", line 726, in assertSequenceEqual
    self.fail(msg)
  File "/usr/lib/python2.7/unittest/case.py", line 412, in fail
    raise self.failureException(msg)
AssertionError: Lists differ: ['ffin', 'foo'] != ['\xc4ffin', 'foo']

First differing element 0:
ffin
�ffin

- ['ffin', 'foo']
+ ['\xc4ffin', 'foo']
?   ++++


                  
  Ran 93 tests with 2 failures and 0 errors in 0.246 seconds.
Tearing down left over layers:
  Tear down zope.testing.testrunner.layer.UnitTests in 0.000 seconds.
Total: 1118 tests, 3 failures, 0 errors in 3 minutes 9.032 seconds.

It could be due to missing locales. Try to fix this running as root:

locale-gen en_US.ISO-8859-1 en_US.ISO-8859-1 en_US.ISO8859-15 de_DE@euro fr_FR@euro nl_NL@euro
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment