aboutsummaryrefslogtreecommitdiffstats
path: root/main/py-nose/fix-doctests-unicode.patch
diff options
context:
space:
mode:
authorJakub Jirutka <jakub@jirutka.cz>2017-06-30 00:10:34 +0200
committerJakub Jirutka <jakub@jirutka.cz>2017-06-30 00:11:46 +0200
commit430209682f76651efadf255116830965ed295d5c (patch)
tree041158b686159e8f526b48afdaed323f2f8888a3 /main/py-nose/fix-doctests-unicode.patch
parentb16c1e47001d6a97b758ee5fb6fc47caa797d02c (diff)
downloadaports-430209682f76651efadf255116830965ed295d5c.tar.bz2
aports-430209682f76651efadf255116830965ed295d5c.tar.xz
main/py-nose: add py2/py3 subpackages and check
Patches are ported from Fedora.
Diffstat (limited to 'main/py-nose/fix-doctests-unicode.patch')
-rw-r--r--main/py-nose/fix-doctests-unicode.patch21
1 files changed, 21 insertions, 0 deletions
diff --git a/main/py-nose/fix-doctests-unicode.patch b/main/py-nose/fix-doctests-unicode.patch
new file mode 100644
index 0000000000..a788ed9c43
--- /dev/null
+++ b/main/py-nose/fix-doctests-unicode.patch
@@ -0,0 +1,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: