diff options
author | Guido van Rossum <guido@python.org> | 2007-05-22 22:25:42 +0000 |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-05-22 22:25:42 +0000 |
commit | fd60d1d486b571bed1af169d8f915c55fb62dbe9 (patch) | |
tree | a2ff5da4b28dc35fee4553381a34191125f55757 /Lib/test/test_binhex.py | |
parent | dbf398eebb2681ccd2624ac4e7f1a883f3f235a9 (diff) | |
download | cpython-fd60d1d486b571bed1af169d8f915c55fb62dbe9.tar.gz |
Make test_binhex pass. (Do we really want to support it still?)
Diffstat (limited to 'Lib/test/test_binhex.py')
-rwxr-xr-x | Lib/test/test_binhex.py | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/Lib/test/test_binhex.py b/Lib/test/test_binhex.py index 2f89703b44..61c24c9d11 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() |