diff options
Diffstat (limited to 'python/google/protobuf/internal/message_factory_test.py')
-rw-r--r-- | python/google/protobuf/internal/message_factory_test.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/python/google/protobuf/internal/message_factory_test.py b/python/google/protobuf/internal/message_factory_test.py index 4caa2443..aa7af2d0 100644 --- a/python/google/protobuf/internal/message_factory_test.py +++ b/python/google/protobuf/internal/message_factory_test.py @@ -183,7 +183,14 @@ class MessageFactoryTest(unittest.TestCase): with self.assertRaises(Exception) as cm: factory.GetMessages([f.name]) - self.assertIsInstance(cm.exception, (AssertionError, ValueError)) + self.assertIn(str(cm.exception), + ['Extensions ' + '"google.protobuf.python.internal.Duplicate.extension_field" and' + ' "google.protobuf.python.internal.Extension.extension_field"' + ' both try to extend message type' + ' "google.protobuf.python.internal.Container"' + ' with field number 2.', + 'Double registration of Extensions']) if __name__ == '__main__': |