diff options
author | Feng Xiao <xfxyjwf@gmail.com> | 2015-08-25 20:24:43 -0700 |
---|---|---|
committer | Feng Xiao <xfxyjwf@gmail.com> | 2015-08-25 20:24:43 -0700 |
commit | b192ba87f72b5e3e8add09bbcbb7623831e3079b (patch) | |
tree | affb3beff3c33050e7f93647ddab8606899ff03d /python/google/protobuf/internal/descriptor_database_test.py | |
parent | 5da0b46811a103bd1a953f496d4bcd5ff45d3736 (diff) | |
parent | cf94f7b74495d08b833056016e045a0ae3fb64fa (diff) | |
download | protobuf-javalite-b192ba87f72b5e3e8add09bbcbb7623831e3079b.tar.gz |
Merge remote-tracking branch 'origin/master' into beta-1
Diffstat (limited to 'python/google/protobuf/internal/descriptor_database_test.py')
-rw-r--r-- | python/google/protobuf/internal/descriptor_database_test.py | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/python/google/protobuf/internal/descriptor_database_test.py b/python/google/protobuf/internal/descriptor_database_test.py index 8416e157..1baff7d1 100644 --- a/python/google/protobuf/internal/descriptor_database_test.py +++ b/python/google/protobuf/internal/descriptor_database_test.py @@ -34,7 +34,10 @@ __author__ = 'matthewtoia@google.com (Matt Toia)' -import unittest +try: + import unittest2 as unittest +except ImportError: + import unittest from google.protobuf import descriptor_pb2 from google.protobuf.internal import factory_test2_pb2 from google.protobuf import descriptor_database @@ -48,17 +51,17 @@ class DescriptorDatabaseTest(unittest.TestCase): factory_test2_pb2.DESCRIPTOR.serialized_pb) db.Add(file_desc_proto) - self.assertEquals(file_desc_proto, db.FindFileByName( + self.assertEqual(file_desc_proto, db.FindFileByName( 'google/protobuf/internal/factory_test2.proto')) - self.assertEquals(file_desc_proto, db.FindFileContainingSymbol( + self.assertEqual(file_desc_proto, db.FindFileContainingSymbol( 'google.protobuf.python.internal.Factory2Message')) - self.assertEquals(file_desc_proto, db.FindFileContainingSymbol( + self.assertEqual(file_desc_proto, db.FindFileContainingSymbol( 'google.protobuf.python.internal.Factory2Message.NestedFactory2Message')) - self.assertEquals(file_desc_proto, db.FindFileContainingSymbol( + self.assertEqual(file_desc_proto, db.FindFileContainingSymbol( 'google.protobuf.python.internal.Factory2Enum')) - self.assertEquals(file_desc_proto, db.FindFileContainingSymbol( + self.assertEqual(file_desc_proto, db.FindFileContainingSymbol( 'google.protobuf.python.internal.Factory2Message.NestedFactory2Enum')) - self.assertEquals(file_desc_proto, db.FindFileContainingSymbol( + self.assertEqual(file_desc_proto, db.FindFileContainingSymbol( 'google.protobuf.python.internal.MessageWithNestedEnumOnly.NestedEnum')) if __name__ == '__main__': |