mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
bpo-32259: Make a TypeError message when unpack non-iterable more specific. (#4903)
This commit is contained in:
parent
a8f4e15f3d
commit
13a6c098c2
5 changed files with 16 additions and 6 deletions
|
@ -866,7 +866,7 @@ class TestCase(unittest.TestCase):
|
|||
self.assertNotEqual(Point3D(1, 2, 3), (1, 2, 3))
|
||||
|
||||
# Make sure we can't unpack
|
||||
with self.assertRaisesRegex(TypeError, 'is not iterable'):
|
||||
with self.assertRaisesRegex(TypeError, 'unpack'):
|
||||
x, y, z = Point3D(4, 5, 6)
|
||||
|
||||
# Maka sure another class with the same field names isn't
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue