Fixed failing unit tests due to str/bytes mismatch.

Changed "assert isinstance(...)" in hmac.py to raise proper TypeError.
This commit is contained in:
Alexandre Vassalotti 2008-03-03 02:59:49 +00:00
parent 7f757edf15
commit a351f7701a
4 changed files with 22 additions and 19 deletions

View file

@ -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')