bpo-32259: Make a TypeError message when unpack non-iterable more specific. (#4903)

This commit is contained in:
Serhiy Storchaka 2017-12-26 12:30:41 +02:00 committed by GitHub
parent a8f4e15f3d
commit 13a6c098c2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 16 additions and 6 deletions

View file

@ -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