summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_binhex.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-05-22 22:25:42 (GMT)
committerGuido van Rossum <guido@python.org>2007-05-22 22:25:42 (GMT)
commitdcee3c0d1f536bef1c01fbdcbf714b82b7aa1b1e (patch)
treedf6ecb80f5c2d01243b22690a7006b9415542135 /Lib/test/test_binhex.py
parent4581ae5fa2450db3f00384e4b2e86654605100d4 (diff)
downloadcpython-dcee3c0d1f536bef1c01fbdcbf714b82b7aa1b1e.zip
cpython-dcee3c0d1f536bef1c01fbdcbf714b82b7aa1b1e.tar.gz
cpython-dcee3c0d1f536bef1c01fbdcbf714b82b7aa1b1e.tar.bz2
Make test_binhex pass. (Do we really want to support it still?)
Diffstat (limited to 'Lib/test/test_binhex.py')
-rwxr-xr-xLib/test/test_binhex.py13
1 files changed, 5 insertions, 8 deletions
diff --git a/Lib/test/test_binhex.py b/Lib/test/test_binhex.py
index 2f89703..61c24c9 100755
--- a/Lib/test/test_binhex.py
+++ b/Lib/test/test_binhex.py
@@ -17,16 +17,13 @@ class BinHexTestCase(unittest.TestCase):
self.fname2 = test_support.TESTFN + "2"
def tearDown(self):
- try: os.unlink(self.fname1)
- except OSError: pass
+ test_support.unlink(self.fname1)
+ test_support.unlink(self.fname2)
- try: os.unlink(self.fname2)
- except OSError: pass
-
- DATA = 'Jack is my hero'
+ DATA = b'Jack is my hero'
def test_binhex(self):
- f = open(self.fname1, 'w')
+ f = open(self.fname1, 'wb')
f.write(self.DATA)
f.close()
@@ -34,7 +31,7 @@ class BinHexTestCase(unittest.TestCase):
binhex.hexbin(self.fname2, self.fname1)
- f = open(self.fname1, 'r')
+ f = open(self.fname1, 'rb')
finish = f.readline()
f.close()