summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authorOndrej Certik <ondrej.certik@gmail.com>2012-08-03 07:27:42 -0700
committerOndrej Certik <ondrej.certik@gmail.com>2012-08-03 07:45:12 -0700
commit4234b6b13e3ee9da6fc1c24e9e8c442d77587837 (patch)
tree3363b566724a93c2d10057305dfc92bcda7d64d8 /numpy
parenta9d58ab42da8d2ed9071044848a54c5e066b557a (diff)
downloadnumpy-4234b6b13e3ee9da6fc1c24e9e8c442d77587837.tar.gz
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.
Diffstat (limited to 'numpy')
-rw-r--r--numpy/core/tests/test_unicode.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/numpy/core/tests/test_unicode.py b/numpy/core/tests/test_unicode.py
index d47ac548b..7b27076e8 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'
############################################################