mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
Make test_binhex pass. (Do we really want to support it still?)
This commit is contained in:
parent
4581ae5fa2
commit
dcee3c0d1f
2 changed files with 26 additions and 31 deletions
|
@ -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()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue