Skip to content

Commit 8cbebc0

Browse files
committed
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.
1 parent 2eb2fb4 commit 8cbebc0

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

test/test_indexer.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,15 @@ def test_manyresults(self):
169169
def test_unicode(self):
170170
"""Test with unicode words. see:
171171
https://issues.roundup-tracker.org/issue1344046"""
172-
173-
self.dex.add_text(('test', '1', 'a'), u'Spr\xfcnge')
174-
self.assertSeqEqual(self.dex.find([u'Spr\xfcnge']),
175-
[('test', '1', 'a')])
172+
russian=u'\u0440\u0443\u0441\u0441\u043a\u0438\u0439\u0442\u0435\u043a\u0441\u0442Spr\xfcnge'
173+
german=u'Spr\xfcnge'
174+
self.dex.add_text(('test', '1', 'a'), german )
175+
self.dex.add_text(('test', '2', 'a'), russian + u' ' + german )
176+
177+
self.assertSeqEqual(self.dex.find([ u'Spr\xfcnge']),
178+
[('test', '1', 'a'), ('test', '2', 'a')])
179+
self.assertSeqEqual(self.dex.find([u'\u0440\u0443\u0441\u0441\u043a\u0438\u0439\u0442\u0435\u043a\u0441\u0442Spr\xfcnge']),
180+
[('test', '2', 'a')])
176181

177182
def tearDown(self):
178183
shutil.rmtree('test-index')

0 commit comments

Comments
 (0)