[Checkins] SVN: zope.app.locales/trunk/ Updated tests to handle Unicode correctly.

Hanno Schlichting hannosch at hannosch.eu
Tue Dec 22 14:27:32 EST 2009


Log message for revision 106918:
  Updated tests to handle Unicode correctly.
  

Changed:
  U   zope.app.locales/trunk/CHANGES.txt
  U   zope.app.locales/trunk/src/zope/app/locales/extract.py
  U   zope.app.locales/trunk/src/zope/app/locales/tests.py

-=-
Modified: zope.app.locales/trunk/CHANGES.txt
===================================================================
--- zope.app.locales/trunk/CHANGES.txt	2009-12-22 19:22:07 UTC (rev 106917)
+++ zope.app.locales/trunk/CHANGES.txt	2009-12-22 19:27:32 UTC (rev 106918)
@@ -5,6 +5,8 @@
 3.5.2 (unreleased)
 ------------------
 
+- Updated tests to handle Unicode correctly.
+
 - Update Japanese Translation (thanks Takeshi Yamamoto).
 
 3.5.1 (2009-01-27)

Modified: zope.app.locales/trunk/src/zope/app/locales/extract.py
===================================================================
--- zope.app.locales/trunk/src/zope/app/locales/extract.py	2009-12-22 19:22:07 UTC (rev 106917)
+++ zope.app.locales/trunk/src/zope/app/locales/extract.py	2009-12-22 19:27:32 UTC (rev 106918)
@@ -465,7 +465,7 @@
     Now let's find the strings for the domain ``test``:
 
       >>> extract.tal_strings(dir, domain='test', include_default_domain=True)
-      {'test': [('...test.pt', 1)], 'no domain': [('...no.pt', 1)]}
+      {u'test': [('...test.pt', 1)], u'no domain': [('...no.pt', 1)]}
 
     And now an xml file
       >>> xml = open(os.path.join(dir, 'xml.pt'), 'w')
@@ -492,7 +492,7 @@
 
       >>> extract.tal_strings(dir, domain='html', include_default_domain=True,
       ...                     filePattern='*.html')
-      {'html': [('...test.html', 1)]}
+      {u'html': [('...test.html', 1)]}
 
     Cleanup
 

Modified: zope.app.locales/trunk/src/zope/app/locales/tests.py
===================================================================
--- zope.app.locales/trunk/src/zope/app/locales/tests.py	2009-12-22 19:22:07 UTC (rev 106917)
+++ zope.app.locales/trunk/src/zope/app/locales/tests.py	2009-12-22 19:27:32 UTC (rev 106918)
@@ -17,7 +17,7 @@
 """
 import doctest
 import unittest
-from zope.testing.doctestunit import DocTestSuite
+from zope.testing.doctest import DocTestSuite
 
 def test_suite():
     return unittest.TestSuite((



More information about the checkins mailing list