artemp/trac2github — Issue #865: unicode test failures
Author: artemp
Created: 2011-10-09 20:53:43+00:00
State: open
Labels: Core_Library

Seeing these on osx as well as on RHEL and Ubuntu. Likely a problem in the tests as much as the code, but we should fix before release. Since I'm not unicode saavy, anyone else able to take a look?

{{{
#!sh
$ make test

............T...F..F./Library/Python/2.6/site-packages/nose-0.11.3-py2.6.egg/nose/tools.py:31: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
assert a == b, msg or "%r != %r" % (a, b)
F....................................................................T.T........F.T..TT..............................T.....
======================================================================
FAIL: test_set_get_properties (python_tests.feature_test.FeatureTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/dane/projects/mapnik-dev/clang-O3/tests/python_tests/feature_test.py", line 35, in test_set_get_properties
test_val(v)
File "/Users/dane/projects/mapnik-dev/clang-O3/tests/python_tests/feature_test.py", line 33, in test_val
self.failUnlessEqual(f[key], expected)
AssertionError: u'avi\ufffd\ufffdn' != u'avi\xf3n'

======================================================================
FAIL: python_tests.filter_test.test_unicode_regex_match
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Library/Python/2.6/site-packages/nose-0.11.3-py2.6.egg/nose/case.py", line 186, in runTest
self.test(*self.arg)
File "/Users/dane/projects/mapnik-dev/clang-O3/tests/python_tests/filter_test.py", line 107, in test_unicode_regex_match
eq_(expr.evaluate(f),True) # 1 == True
File "/Library/Python/2.6/site-packages/nose-0.11.3-py2.6.egg/nose/tools.py", line 31, in eq_
assert a == b, msg or "%r != %r" % (a, b)
AssertionError: False != True

======================================================================
FAIL: python_tests.filter_test.test_unicode_regex_replace
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Library/Python/2.6/site-packages/nose-0.11.3-py2.6.egg/nose/case.py", line 186, in runTest
self.test(*self.arg)
File "/Users/dane/projects/mapnik-dev/clang-O3/tests/python_tests/filter_test.py", line 119, in test_unicode_regex_replace
eq_(expr.evaluate(f),'Q u é b e c')
File "/Library/Python/2.6/site-packages/nose-0.11.3-py2.6.egg/nose/tools.py", line 31, in eq_
assert a == b, msg or "%r != %r" % (a, b)
AssertionError: u'Q u\ufffd \ufffd \ufffd \ufffd \ufffd \ufffdb e c' != 'Q u \xc3\xa9 b e c'

======================================================================
FAIL: python_tests.object_test.test_shapefile_properties
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Library/Python/2.6/site-packages/nose-0.11.3-py2.6.egg/nose/case.py", line 186, in runTest
self.test(*self.arg)
File "/Users/dane/projects/mapnik-dev/clang-O3/tests/python_tests/object_test.py", line 264, in test_shapefile_properties
eq_(f['NOM_FR'], u'Qu\xe9bec')
File "/Library/Python/2.6/site-packages/nose-0.11.3-py2.6.egg/nose/tools.py", line 31, in eq_
assert a == b, msg or "%r != %r" % (a, b)
AssertionError: u'Qu\ufffdbec' != u'Qu\xe9bec'

----------------------------------------------------------------------
Ran 144 tests in 1.563s

FAILED (TODO=7, failures=4)
}}}