aports/main/py-nose/fix-doctests-unicode.patch
Jakub Jirutka 430209682f main/py-nose: add py2/py3 subpackages and check
Patches are ported from Fedora.
2017-06-30 00:11:46 +02:00

22 lines
625 B
Diff

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: