You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-python/oct2py/files/oct2py-1.3.0-test.patch

22 lines
804 B

diff --git a/oct2py/ipython/tests/test_octavemagic.py b/oct2py/ipython/tests/test_octavemagic.py
index b75d992..43c0a8b 100644
--- a/oct2py/ipython/tests/test_octavemagic.py
+++ b/oct2py/ipython/tests/test_octavemagic.py
@@ -1,5 +1,6 @@
"""Tests for Octave magics extension."""
+import codecs
import unittest
import sys
from IPython.testing.globalipapp import get_ipython
@@ -22,7 +23,8 @@ class OctaveMagicTest(unittest.TestCase):
IPython team's logic.
'''
if not sys.stdin.encoding:
- sys.stdin.encoding = 'utf-8' # needed for py.test
+ # needed for py.test
+ sys.stdin = codecs.getreader('utf-8')(sys.stdin)
cls.ip = get_ipython()
# This is just to get a minimally modified version of the changes
# working