[Zope3-checkins] CVS: Zope3/lib/python/Zope/TextIndex/tests - testLexicon.py:1.3

Guido van Rossum guido@python.org
Fri, 13 Dec 2002 17:34:59 -0500


Update of /cvs-repository/Zope3/lib/python/Zope/TextIndex/tests
In directory cvs.zope.org:/tmp/cvs-serv2777

Modified Files:
	testLexicon.py 
Log Message:
Don't use Latin-1 characters in string literals; use \xFF hex escapes.


=== Zope3/lib/python/Zope/TextIndex/tests/testLexicon.py 1.2 => 1.3 ===
--- Zope3/lib/python/Zope/TextIndex/tests/testLexicon.py:1.2	Tue Dec  3 14:15:22 2002
+++ Zope3/lib/python/Zope/TextIndex/tests/testLexicon.py	Fri Dec 13 17:34:58 2002
@@ -113,7 +113,7 @@
         wids = lexicon.sourceToWordIds('cats and dogs')
         wids = lexicon.termToWordIds('hsif')
         self.assertEqual(wids, [2])
-        
+
     def testSplitterLocaleAwareness(self):
         from Zope.TextIndex.HTMLSplitter import HTMLWordSplitter
         import locale
@@ -126,13 +126,13 @@
                 locale.setlocale(locale.LC_ALL, 'German_Germany.1252')
         except locale.Error:
             return # This test doesn't work here :-(
-        words = ['mülltonne waschbär behörde überflieger']
+        expected = ['m\xfclltonne', 'waschb\xe4r',
+                    'beh\xf6rde', '\xfcberflieger']
+        words = [" ".join(expected)]
         words = Splitter().process(words)
-        self.assertEqual(
-            words, ['mülltonne', 'waschbär', 'behörde', 'überflieger'])
+        self.assertEqual(words, expected)
         words = HTMLWordSplitter().process(words)
-        self.assertEqual(
-            words, ['mülltonne', 'waschbär', 'behörde', 'überflieger'])        
+        self.assertEqual(words, expected)
         locale.setlocale(locale.LC_ALL, loc) # restore saved locale
 
 def test_suite():