Commit fffd7224 authored by Jack Jansen's avatar Jack Jansen

The test opened the binary test data files in text mode! Fixed.

parent 5756ee0f
...@@ -60,11 +60,11 @@ if verbose: ...@@ -60,11 +60,11 @@ if verbose:
tmpIn = TESTFN + "i" tmpIn = TESTFN + "i"
tmpOut = TESTFN + "o" tmpOut = TESTFN + "o"
try: try:
fin = open(tmpIn, 'w') fin = open(tmpIn, 'wb')
fin.write(teststr) fin.write(teststr)
fin.close() fin.close()
fin = open(tmpIn, 'r') fin = open(tmpIn, 'rb')
fout = open(tmpOut, 'w') fout = open(tmpOut, 'w')
uu.encode(fin, fout, tmpIn, mode=0644) uu.encode(fin, fout, tmpIn, mode=0644)
fin.close() fin.close()
...@@ -79,7 +79,7 @@ try: ...@@ -79,7 +79,7 @@ try:
if verbose: if verbose:
print '6. decode file-> file' print '6. decode file-> file'
uu.decode(tmpOut) uu.decode(tmpOut)
fin = open(tmpIn, 'r') fin = open(tmpIn, 'rb')
s = fin.read() s = fin.read()
fin.close() fin.close()
verify(s == teststr) verify(s == teststr)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment