summaryrefslogtreecommitdiff
path: root/Lib/test/test_struct.py
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2017-02-04 09:35:10 +0300
committerBerker Peksag <berker.peksag@gmail.com>2017-02-04 09:35:10 +0300
commit20d55dda2a4995d33e79acd880c5fccfa54937e4 (patch)
tree5504aaa962c1d6d97fad4b805d0898372f68202e /Lib/test/test_struct.py
parent3821030b7ba4a7ff5d34c33deff4f6886130a951 (diff)
parentb53991455f7f258ede7a26b69c2be5b8138b9f8a (diff)
downloadcpython-20d55dda2a4995d33e79acd880c5fccfa54937e4.tar.gz
Issue #29198: 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)