mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
SF patch# 1761465 by Jeffrey Yasskin.
Fix test_aepack and test_applesingle.
This commit is contained in:
parent
67feb09d06
commit
f7a94e4b44
7 changed files with 126 additions and 104 deletions
|
|
@ -12,8 +12,8 @@ import applesingle
|
|||
|
||||
AS_MAGIC=0x00051600
|
||||
AS_VERSION=0x00020000
|
||||
dataforkdata = 'hello\r\0world\n'
|
||||
resourceforkdata = 'goodbye\ncruel\0world\r'
|
||||
dataforkdata = b'hello\r\0world\n'
|
||||
resourceforkdata = b'goodbye\ncruel\0world\r'
|
||||
|
||||
applesingledata = struct.pack(">ll16sh", AS_MAGIC, AS_VERSION, "foo", 2) + \
|
||||
struct.pack(">llllll", 1, 50, len(dataforkdata),
|
||||
|
|
@ -25,7 +25,7 @@ TESTFN2 = test_support.TESTFN + '2'
|
|||
class TestApplesingle(unittest.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
fp = open(test_support.TESTFN, 'w')
|
||||
fp = open(test_support.TESTFN, 'wb')
|
||||
fp.write(applesingledata)
|
||||
fp.close()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue