Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: third_party/protobuf/python/google/protobuf/internal/generator_test.py

Issue 2590803003: Revert "third_party/protobuf: Update to HEAD (83d681ee2c)" (Closed)
Patch Set: Created 3 years, 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 #! /usr/bin/env python 1 #! /usr/bin/env python
2 # 2 #
3 # Protocol Buffers - Google's data interchange format 3 # Protocol Buffers - Google's data interchange format
4 # Copyright 2008 Google Inc. All rights reserved. 4 # Copyright 2008 Google Inc. All rights reserved.
5 # https://developers.google.com/protocol-buffers/ 5 # https://developers.google.com/protocol-buffers/
6 # 6 #
7 # Redistribution and use in source and binary forms, with or without 7 # Redistribution and use in source and binary forms, with or without
8 # modification, are permitted provided that the following conditions are 8 # modification, are permitted provided that the following conditions are
9 # met: 9 # met:
10 # 10 #
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 220
221 def testFileDescriptor(self): 221 def testFileDescriptor(self):
222 self.assertEqual(unittest_pb2.DESCRIPTOR.name, 222 self.assertEqual(unittest_pb2.DESCRIPTOR.name,
223 'google/protobuf/unittest.proto') 223 'google/protobuf/unittest.proto')
224 self.assertEqual(unittest_pb2.DESCRIPTOR.package, 'protobuf_unittest') 224 self.assertEqual(unittest_pb2.DESCRIPTOR.package, 'protobuf_unittest')
225 self.assertFalse(unittest_pb2.DESCRIPTOR.serialized_pb is None) 225 self.assertFalse(unittest_pb2.DESCRIPTOR.serialized_pb is None)
226 self.assertEqual(unittest_pb2.DESCRIPTOR.dependencies, 226 self.assertEqual(unittest_pb2.DESCRIPTOR.dependencies,
227 [unittest_import_pb2.DESCRIPTOR]) 227 [unittest_import_pb2.DESCRIPTOR])
228 self.assertEqual(unittest_import_pb2.DESCRIPTOR.dependencies, 228 self.assertEqual(unittest_import_pb2.DESCRIPTOR.dependencies,
229 [unittest_import_public_pb2.DESCRIPTOR]) 229 [unittest_import_public_pb2.DESCRIPTOR])
230 self.assertEqual(unittest_import_pb2.DESCRIPTOR.public_dependencies, 230
231 [unittest_import_public_pb2.DESCRIPTOR])
232 def testNoGenericServices(self): 231 def testNoGenericServices(self):
233 self.assertTrue(hasattr(unittest_no_generic_services_pb2, "TestMessage")) 232 self.assertTrue(hasattr(unittest_no_generic_services_pb2, "TestMessage"))
234 self.assertTrue(hasattr(unittest_no_generic_services_pb2, "FOO")) 233 self.assertTrue(hasattr(unittest_no_generic_services_pb2, "FOO"))
235 self.assertTrue(hasattr(unittest_no_generic_services_pb2, "test_extension")) 234 self.assertTrue(hasattr(unittest_no_generic_services_pb2, "test_extension"))
236 235
237 # Make sure unittest_no_generic_services_pb2 has no services subclassing 236 # Make sure unittest_no_generic_services_pb2 has no services subclassing
238 # Proto2 Service class. 237 # Proto2 Service class.
239 if hasattr(unittest_no_generic_services_pb2, "TestService"): 238 if hasattr(unittest_no_generic_services_pb2, "TestService"):
240 self.assertFalse(issubclass(unittest_no_generic_services_pb2.TestService, 239 self.assertFalse(issubclass(unittest_no_generic_services_pb2.TestService,
241 service.Service)) 240 service.Service))
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 'protobuf_unittest.TestAllTypes.NestedEnum').full_name) 339 'protobuf_unittest.TestAllTypes.NestedEnum').full_name)
341 340
342 def testFindFileByName(self): 341 def testFindFileByName(self):
343 self.assertEqual( 342 self.assertEqual(
344 'google/protobuf/unittest.proto', 343 'google/protobuf/unittest.proto',
345 symbol_database.Default().pool.FindFileByName( 344 symbol_database.Default().pool.FindFileByName(
346 'google/protobuf/unittest.proto').name) 345 'google/protobuf/unittest.proto').name)
347 346
348 if __name__ == '__main__': 347 if __name__ == '__main__':
349 unittest.main() 348 unittest.main()
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698