Hi list

I recently ran the zope3 test suite on a fresh checkout.
and I have a non-ascii default encoding set up in my python's
site.py file. To be exact, on Windows it is::

  In [1]: import sys
  In [2]: sys.getdefaultencoding()
  Out[2]: 'cp1252'

(on the Linux box it's 'utf-8')

I get several test errors, I'll only post the first one here::

  Error in test testBucketGet (BTrees.tests.test_compare.CompareTest)
  Traceback (most recent call last):
    File "C:\Python24\lib\unittest.py", line 251, in run
File "d:\HOME\_programmieren\Zope3\src\BTrees\tests\test_compare.py", line 32, in setUp
      self.assertRaises(UnicodeError, unicode, self.s)
    File "C:\Python24\lib\unittest.py", line 325, in failUnlessRaises
      raise self.failureException, "%s not raised" % excName
  AssertionError: UnicodeError not raised

this is because of the following lines of the test setup::

  # These defaults only make sense if the default encoding
  # prevents s from being promoted to Unicode.
  self.assertRaises(UnicodeError, unicode, self.s)

Well mine doesn't. :)

Two questions:

- would it make sense to put::


  there instead?
  To allow the tests to run also on non-default systems.

- does a non-ascii defaultencoding pose a risk for running Zope3?

Zope3-dev mailing list
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to