summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_pty.py
diff options
context:
space:
mode:
authorAlexandre Vassalotti <alexandre@peadrop.com>2008-03-03 02:59:49 (GMT)
committerAlexandre Vassalotti <alexandre@peadrop.com>2008-03-03 02:59:49 (GMT)
commita351f7701a6d9e0648b4d108821ebd4ce7b38fee (patch)
tree4797bdff37569b8fbc6ab7722444592b6b248f55 /Lib/test/test_pty.py
parent7f757edf15d130f82149c2133974056db1be201e (diff)
downloadcpython-a351f7701a6d9e0648b4d108821ebd4ce7b38fee.zip
cpython-a351f7701a6d9e0648b4d108821ebd4ce7b38fee.tar.gz
cpython-a351f7701a6d9e0648b4d108821ebd4ce7b38fee.tar.bz2
Fixed failing unit tests due to str/bytes mismatch.
Changed "assert isinstance(...)" in hmac.py to raise proper TypeError.
Diffstat (limited to 'Lib/test/test_pty.py')
-rw-r--r--Lib/test/test_pty.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/test_pty.py b/Lib/test/test_pty.py
index e2058ab..58a3041 100644
--- a/Lib/test/test_pty.py
+++ b/Lib/test/test_pty.py
@@ -157,7 +157,8 @@ class PtyTest(unittest.TestCase):
break
if not data:
break
- sys.stdout.write(data.replace('\r\n', '\n').decode('ascii'))
+ sys.stdout.write(str(data.replace(b'\r\n', b'\n'),
+ encoding='ascii'))
##line = os.read(master_fd, 80)
##lines = line.replace('\r\n', '\n').split('\n')