lbalhar / rpms / numpy

Forked from rpms/numpy 4 years ago
Clone
Blob Blame History Raw
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'
 
 
 ############################################################