aboutsummaryrefslogtreecommitdiffstats
path: root/community/py3-nose/fix-doctests-unicode.patch
blob: a788ed9c438230f1eef6074559454200500893b6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
Patch-Source: https://src.fedoraproject.org/cgit/rpms/python-nose.git/tree/python-nose-coverage4.patch

--- a/nose/plugins/doctests.py
+++ b/nose/plugins/doctests.py
@@ -49,6 +49,7 @@ test.
 """
 from __future__ import generators
 
+import codecs
 import logging
 import os
 import sys
@@ -259,7 +260,7 @@ class Doctest(Plugin):
         """
         if self.extension and anyp(filename.endswith, self.extension):
             name = os.path.basename(filename)
-            dh = open(filename)
+            dh = codecs.open(filename, encoding='utf-8')
             try:
                 doc = dh.read()
             finally: