diff options
author | Alexandre Vassalotti <alexandre@peadrop.com> | 2008-03-03 02:59:49 (GMT) |
---|---|---|
committer | Alexandre Vassalotti <alexandre@peadrop.com> | 2008-03-03 02:59:49 (GMT) |
commit | a351f7701a6d9e0648b4d108821ebd4ce7b38fee (patch) | |
tree | 4797bdff37569b8fbc6ab7722444592b6b248f55 /Lib/test/test_pty.py | |
parent | 7f757edf15d130f82149c2133974056db1be201e (diff) | |
download | cpython-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.py | 3 |
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') |