-
Notifications
You must be signed in to change notification settings - Fork 15.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Drop apputils dependency #276
Merged
haberman
merged 5 commits into
protocolbuffers:master
from
tamird:drop-apputils-dependency
Apr 11, 2015
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
ef1b747
[PYTHON] Clarify API version comment
tamird a46a2e9
[PYTHON] Remove unnecessary `include_dir`
tamird d632bc7
[PYTHON] README: explain homebrew shenanigans
tamird dab96f1
[PYTHON] Remove awkward duplicate tests
tamird 9f42f5f
[PYTHON] Drop dependency on 'google.apputils'.
tamird File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,13 +34,14 @@ | |
|
||
__author__ = '[email protected] (Matt Toia)' | ||
|
||
from google.apputils import basetest | ||
import unittest | ||
|
||
from google.protobuf import descriptor_pb2 | ||
from google.protobuf.internal import factory_test2_pb2 | ||
from google.protobuf import descriptor_database | ||
|
||
|
||
class DescriptorDatabaseTest(basetest.TestCase): | ||
class DescriptorDatabaseTest(unittest.TestCase): | ||
|
||
def testAdd(self): | ||
db = descriptor_database.DescriptorDatabase() | ||
|
@@ -62,4 +63,4 @@ def testAdd(self): | |
'google.protobuf.python.internal.MessageWithNestedEnumOnly.NestedEnum')) | ||
|
||
if __name__ == '__main__': | ||
basetest.main() | ||
unittest.main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,8 +35,8 @@ | |
__author__ = '[email protected] (Will Robinson)' | ||
|
||
import sys | ||
import unittest | ||
|
||
from google.apputils import basetest | ||
from google.protobuf import unittest_custom_options_pb2 | ||
from google.protobuf import unittest_import_pb2 | ||
from google.protobuf import unittest_pb2 | ||
|
@@ -52,7 +52,7 @@ | |
""" | ||
|
||
|
||
class DescriptorTest(basetest.TestCase): | ||
class DescriptorTest(unittest.TestCase): | ||
|
||
def setUp(self): | ||
file_proto = descriptor_pb2.FileDescriptorProto( | ||
|
@@ -390,7 +390,7 @@ def testFileDescriptor(self): | |
self.assertEqual(self.my_file.name, 'some/filename/some.proto') | ||
self.assertEqual(self.my_file.package, 'protobuf_unittest') | ||
|
||
@basetest.unittest.skipIf( | ||
@unittest.skipIf( | ||
api_implementation.Type() != 'cpp' or api_implementation.Version() != 2, | ||
'Immutability of descriptors is only enforced in v2 implementation') | ||
def testImmutableCppDescriptor(self): | ||
|
@@ -403,7 +403,7 @@ def testImmutableCppDescriptor(self): | |
message_descriptor.fields.append(None) | ||
|
||
|
||
class GeneratedDescriptorTest(basetest.TestCase): | ||
class GeneratedDescriptorTest(unittest.TestCase): | ||
"""Tests for the properties of descriptors in generated code.""" | ||
|
||
def CheckMessageDescriptor(self, message_descriptor): | ||
|
@@ -493,7 +493,7 @@ def testCppDescriptorContainer_Iterator(self): | |
self.assertEqual('FOO', next(values_iter).name) | ||
|
||
|
||
class DescriptorCopyToProtoTest(basetest.TestCase): | ||
class DescriptorCopyToProtoTest(unittest.TestCase): | ||
"""Tests for CopyTo functions of Descriptor.""" | ||
|
||
def _AssertProtoEqual(self, actual_proto, expected_class, expected_ascii): | ||
|
@@ -694,7 +694,7 @@ def testCopyToProto_ServiceDescriptor(self): | |
# TEST_SERVICE_ASCII) | ||
|
||
|
||
class MakeDescriptorTest(basetest.TestCase): | ||
class MakeDescriptorTest(unittest.TestCase): | ||
|
||
def testMakeDescriptorWithNestedFields(self): | ||
file_descriptor_proto = descriptor_pb2.FileDescriptorProto() | ||
|
@@ -776,4 +776,4 @@ def testMakeDescriptorWithOptions(self): | |
options.Extensions[unittest_custom_options_pb2.msgopt].i) | ||
|
||
if __name__ == '__main__': | ||
basetest.main() | ||
unittest.main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,7 +41,8 @@ | |
|
||
__author__ = '[email protected] (Will Robinson)' | ||
|
||
from google.apputils import basetest | ||
import unittest | ||
|
||
from google.protobuf.internal import test_bad_identifiers_pb2 | ||
from google.protobuf import unittest_custom_options_pb2 | ||
from google.protobuf import unittest_import_pb2 | ||
|
@@ -55,7 +56,7 @@ | |
MAX_EXTENSION = 536870912 | ||
|
||
|
||
class GeneratorTest(basetest.TestCase): | ||
class GeneratorTest(unittest.TestCase): | ||
|
||
def testNestedMessageDescriptor(self): | ||
field_name = 'optional_nested_message' | ||
|
@@ -291,7 +292,7 @@ def testOneof(self): | |
self.assertIs(desc.oneofs[0], desc.oneofs_by_name['oneof_field']) | ||
nested_names = set(['oneof_uint32', 'oneof_nested_message', | ||
'oneof_string', 'oneof_bytes']) | ||
self.assertSameElements( | ||
self.assertItemsEqual( | ||
nested_names, | ||
[field.name for field in desc.oneofs[0].fields]) | ||
for field_name, field_desc in desc.fields_by_name.iteritems(): | ||
|
@@ -301,7 +302,7 @@ def testOneof(self): | |
self.assertIsNone(field_desc.containing_oneof) | ||
|
||
|
||
class SymbolDatabaseRegistrationTest(basetest.TestCase): | ||
class SymbolDatabaseRegistrationTest(unittest.TestCase): | ||
"""Checks that messages, enums and files are correctly registered.""" | ||
|
||
def testGetSymbol(self): | ||
|
@@ -340,4 +341,4 @@ def testFindFileByName(self): | |
'google/protobuf/unittest.proto').name) | ||
|
||
if __name__ == '__main__': | ||
basetest.main() | ||
unittest.main() |
54 changes: 0 additions & 54 deletions
54
python/google/protobuf/internal/message_factory_python_test.py
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think DYLD_LIBRARY_PATH on OS X behaves like LD_LIBRARY_PATH on Linux? http://stackoverflow.com/questions/3146274/is-it-ok-to-use-dyld-library-path-on-mac-os-x-and-whats-the-dynamic-library-s
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does, but dyld (the OS X linker) links the full path at link-time, so
DYLD_LIBRARY_PATH isn't needed in the simple case described here.
On Apr 10, 2015 4:11 PM, "Joshua Haberman" [email protected] wrote:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess what I'm getting at is that it would be nice if the README didn't have to have an entire separate section to address OS X, brew, etc. Your caveat about Brew doesn't apply if the user sets DYLD_LIBRARY_PATH, right? Instead it could just say something like:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nah, that caveat still applies because DYLD_LIBRARY_PATH is not even
consulted when the full path of the library is linked in. I tried every
variation I could think of, and this is the only thing that worked. If you
find another solution, I'm all ears, really.
On Apr 10, 2015 7:39 PM, "Joshua Haberman" [email protected] wrote: