diff test/test_indexer.py @ 5961:f6c58a7b535c

Add a russian string for unicode testing of indexer Also assign strings to vars to make it easier to mix/match tests in the future.
author John Rouillard <rouilj@ieee.org>
date Tue, 29 Oct 2019 22:01:11 -0400
parents 0db2621b6fee
children 6137ea845438
line wrap: on
line diff
--- a/test/test_indexer.py	Tue Oct 29 21:33:10 2019 -0400
+++ b/test/test_indexer.py	Tue Oct 29 22:01:11 2019 -0400
@@ -169,10 +169,15 @@
     def test_unicode(self):
         """Test with unicode words. see:
            https://issues.roundup-tracker.org/issue1344046"""
-        
-        self.dex.add_text(('test', '1', 'a'), u'Spr\xfcnge')
-        self.assertSeqEqual(self.dex.find([u'Spr\xfcnge']),
-                    [('test', '1', 'a')])
+        russian=u'\u0440\u0443\u0441\u0441\u043a\u0438\u0439\u0442\u0435\u043a\u0441\u0442Spr\xfcnge'
+        german=u'Spr\xfcnge'
+        self.dex.add_text(('test', '1', 'a'), german )
+        self.dex.add_text(('test', '2', 'a'), russian + u' ' + german )
+
+        self.assertSeqEqual(self.dex.find([ u'Spr\xfcnge']),
+                    [('test', '1', 'a'), ('test', '2', 'a')])
+        self.assertSeqEqual(self.dex.find([u'\u0440\u0443\u0441\u0441\u043a\u0438\u0439\u0442\u0435\u043a\u0441\u0442Spr\xfcnge']),
+                            [('test', '2', 'a')])
         
     def tearDown(self):
         shutil.rmtree('test-index')

Roundup Issue Tracker: http://roundup-tracker.org/