summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_applesingle.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-07-27 04:41:00 (GMT)
committerGuido van Rossum <guido@python.org>2007-07-27 04:41:00 (GMT)
commitf7a94e4b44f2e5d565864ac784071efb35569161 (patch)
treea999efa04b5fb726df2551ae8e57a4fe1a4064b7 /Lib/test/test_applesingle.py
parent67feb09d065aee7a125b226c0249c4db37a1f4f4 (diff)
downloadcpython-f7a94e4b44f2e5d565864ac784071efb35569161.zip
cpython-f7a94e4b44f2e5d565864ac784071efb35569161.tar.gz
cpython-f7a94e4b44f2e5d565864ac784071efb35569161.tar.bz2
SF patch# 1761465 by Jeffrey Yasskin.
Fix test_aepack and test_applesingle.
Diffstat (limited to 'Lib/test/test_applesingle.py')
-rw-r--r--Lib/test/test_applesingle.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_applesingle.py b/Lib/test/test_applesingle.py
index d533f1a..96450e3 100644
--- a/Lib/test/test_applesingle.py
+++ b/Lib/test/test_applesingle.py
@@ -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()