[Python-3000-checkins] r56472 - python/branches/py3k-struni/Lib/doctest.py

collin.winter python-3000-checkins at python.org
Fri Jul 20 20:08:03 CEST 2007


Author: collin.winter
Date: Fri Jul 20 20:08:03 2007
New Revision: 56472

Modified:
   python/branches/py3k-struni/Lib/doctest.py
Log:
Make doctest pass by specifying the right encoding.

Modified: python/branches/py3k-struni/Lib/doctest.py
==============================================================================
--- python/branches/py3k-struni/Lib/doctest.py	(original)
+++ python/branches/py3k-struni/Lib/doctest.py	Fri Jul 20 20:08:03 2007
@@ -210,7 +210,7 @@
         if hasattr(package, '__loader__'):
             if hasattr(package.__loader__, 'get_data'):
                 return package.__loader__.get_data(filename), filename
-    return open(filename).read(), filename
+    return open(filename, encoding="utf-8").read(), filename
 
 def _indent(s, indent=4):
     """


More information about the Python-3000-checkins mailing list