c8ca126fdd
* Sun Aug 5 2012 David Malcolm <dmalcolm@redhat.com> - 1:1.6.2-5 - rework patches for 3.3 to more directly reflect upstream's commits - re-enable test suite on python 3 - forcibly regenerate Cython .c source to avoid import issues on Python 3.3
29 lines
1.0 KiB
Diff
29 lines
1.0 KiB
Diff
commit 4234b6b13e3ee9da6fc1c24e9e8c442d77587837
|
|
Author: Ondrej Certik <ondrej.certik@gmail.com>
|
|
Date: Fri Aug 3 07:27:42 2012 -0700
|
|
|
|
FIX: Make sure the tests produce valid unicode
|
|
|
|
The tests are testing byte order for unicode, so we can only use such unicode
|
|
data, so that both versions (swapped and unswapped) are valid unicode.
|
|
|
|
diff --git a/numpy/core/tests/test_unicode.py b/numpy/core/tests/test_unicode.py
|
|
index d47ac54..7b27076 100644
|
|
--- a/numpy/core/tests/test_unicode.py
|
|
+++ b/numpy/core/tests/test_unicode.py
|
|
@@ -26,10 +26,12 @@ else:
|
|
return len(arr.data)
|
|
return len(buffer(arr))
|
|
|
|
+# In both cases below we need to make sure that the byte swapped value (as
|
|
+# UCS4) is still a valid unicode:
|
|
# Value that can be represented in UCS2 interpreters
|
|
-ucs2_value = u'\uFFFF'
|
|
+ucs2_value = u'\u0900'
|
|
# Value that cannot be represented in UCS2 interpreters (but can in UCS4)
|
|
-ucs4_value = u'\U0010FFFF'
|
|
+ucs4_value = u'\U00100900'
|
|
|
|
|
|
############################################################
|