diff options
author | Stefan Behnel <stefan_ml@behnel.de> | 2020-06-22 22:51:06 +0200 |
---|---|---|
committer | Stefan Behnel <stefan_ml@behnel.de> | 2020-06-22 22:51:06 +0200 |
commit | cfc3a80aab4ea5c401ee53ff1062dbec9943ea5a (patch) | |
tree | 51c13bbbbf5507b32212067a5dc5b23164355d93 | |
parent | f713beed8c4ca842279408f712204220ae6ea927 (diff) | |
download | cython-cfc3a80aab4ea5c401ee53ff1062dbec9943ea5a.tar.gz |
Extend the surrogate pairs test in a way that also works in Py2.
-rw-r--r-- | Cython/Compiler/Tests/TestStringEncoding.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Cython/Compiler/Tests/TestStringEncoding.py b/Cython/Compiler/Tests/TestStringEncoding.py index 13e81ba23..76de06905 100644 --- a/Cython/Compiler/Tests/TestStringEncoding.py +++ b/Cython/Compiler/Tests/TestStringEncoding.py @@ -19,6 +19,7 @@ class StringEncodingTest(unittest.TestCase): # but it seems to be a parser bug in Py2, which doesn't hurt us in Cython. if sys.version_info[0] != 2: self.assertTrue(StringEncoding.string_contains_lone_surrogates(u"\uD800\uDFFF")) + self.assertTrue(StringEncoding.string_contains_lone_surrogates(u"\uDFFF\uD800"[::-1])) self.assertTrue(StringEncoding.string_contains_lone_surrogates(u"\uD800")) self.assertTrue(StringEncoding.string_contains_lone_surrogates(u"\uDFFF")) |