summaryrefslogtreecommitdiff
path: root/Lib/test/test_struct.py
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@microsoft.com>2017-02-04 16:46:53 -0800
committerSteve Dower <steve.dower@microsoft.com>2017-02-04 16:46:53 -0800
commitb1a1742796fce8078f9f1f3d5e3161122fae3b0a (patch)
tree89c863764481b7c7fbe645be42b16e1d35e92751 /Lib/test/test_struct.py
parent391ed6c73cb1964b57d0b538370a76d03d30511b (diff)
parentcf1f5444eb42a8dc252b295d3863288309996a5d (diff)
downloadcpython-b1a1742796fce8078f9f1f3d5e3161122fae3b0a.tar.gz
Merge from 3.6
Diffstat (limited to 'Lib/test/test_struct.py')
-rw-r--r--Lib/test/test_struct.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_struct.py b/Lib/test/test_struct.py
index be0047589c..cf1d567966 100644
--- a/Lib/test/test_struct.py
+++ b/Lib/test/test_struct.py
@@ -530,13 +530,13 @@ class StructTest(unittest.TestCase):
# format lists containing only count spec should result in an error
self.assertRaises(struct.error, struct.pack, '12345')
- self.assertRaises(struct.error, struct.unpack, '12345', '')
+ self.assertRaises(struct.error, struct.unpack, '12345', b'')
self.assertRaises(struct.error, struct.pack_into, '12345', store, 0)
self.assertRaises(struct.error, struct.unpack_from, '12345', store, 0)
# Format lists with trailing count spec should result in an error
self.assertRaises(struct.error, struct.pack, 'c12345', 'x')
- self.assertRaises(struct.error, struct.unpack, 'c12345', 'x')
+ self.assertRaises(struct.error, struct.unpack, 'c12345', b'x')
self.assertRaises(struct.error, struct.pack_into, 'c12345', store, 0,
'x')
self.assertRaises(struct.error, struct.unpack_from, 'c12345', store,
@@ -545,7 +545,7 @@ class StructTest(unittest.TestCase):
# Mixed format tests
self.assertRaises(struct.error, struct.pack, '14s42', 'spam and eggs')
self.assertRaises(struct.error, struct.unpack, '14s42',
- 'spam and eggs')
+ b'spam and eggs')
self.assertRaises(struct.error, struct.pack_into, '14s42', store, 0,
'spam and eggs')
self.assertRaises(struct.error, struct.unpack_from, '14s42', store, 0)