diff options
| author | Guido van Rossum <guido@python.org> | 2007-07-27 04:41:00 +0000 |
|---|---|---|
| committer | Guido van Rossum <guido@python.org> | 2007-07-27 04:41:00 +0000 |
| commit | f7a94e4b44f2e5d565864ac784071efb35569161 (patch) | |
| tree | a999efa04b5fb726df2551ae8e57a4fe1a4064b7 /Lib/test | |
| parent | 67feb09d065aee7a125b226c0249c4db37a1f4f4 (diff) | |
| download | cpython-git-f7a94e4b44f2e5d565864ac784071efb35569161.tar.gz | |
SF patch# 1761465 by Jeffrey Yasskin.
Fix test_aepack and test_applesingle.
Diffstat (limited to 'Lib/test')
| -rwxr-xr-x | Lib/test/test_aepack.py | 14 | ||||
| -rw-r--r-- | Lib/test/test_applesingle.py | 6 |
2 files changed, 10 insertions, 10 deletions
diff --git a/Lib/test/test_aepack.py b/Lib/test/test_aepack.py index 8a4b035f05..79e59a1a4d 100755 --- a/Lib/test/test_aepack.py +++ b/Lib/test/test_aepack.py @@ -8,18 +8,18 @@ from test import test_support class TestAepack(unittest.TestCase): OBJECTS = [ - aetypes.Enum('enum'), - aetypes.Type('type'), - aetypes.Keyword('kwrd'), + aetypes.Enum(b'enum'), + aetypes.Type(b'type'), + aetypes.Keyword(b'kwrd'), aetypes.Range(1, 10), - aetypes.Comparison(1, '< ', 10), - aetypes.Logical('not ', 1), - aetypes.IntlText(0, 0, 'international text'), + aetypes.Comparison(1, b'< ', 10), + aetypes.Logical(b'not ', 1), + aetypes.IntlText(0, 0, b'international text'), aetypes.IntlWritingCode(0,0), aetypes.QDPoint(50,100), aetypes.QDRectangle(50,100,150,200), aetypes.RGBColor(0x7000, 0x6000, 0x5000), - aetypes.Unknown('xxxx', 'unknown type data'), + aetypes.Unknown(b'xxxx', b'unknown type data'), aetypes.Character(1), aetypes.Character(2, aetypes.Line(2)), ] diff --git a/Lib/test/test_applesingle.py b/Lib/test/test_applesingle.py index d533f1abc0..96450e352f 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() |
