Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
protobuf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
protobuf
Commits
b70e5866
Commit
b70e5866
authored
Aug 13, 2014
by
jieluo@google.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
put python cpp tests into pyext/
parent
7580a892
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
9 additions
and
34 deletions
+9
-34
reflection_test.py
python/google/protobuf/internal/reflection_test.py
+0
-26
descriptor_cpp2_test.py
python/google/protobuf/pyext/descriptor_cpp2_test.py
+0
-0
message_factory_cpp2_test.py
python/google/protobuf/pyext/message_factory_cpp2_test.py
+0
-0
reflection_cpp2_generated_test.py
...n/google/protobuf/pyext/reflection_cpp2_generated_test.py
+0
-0
setup.py
python/setup.py
+9
-8
No files found.
python/google/protobuf/internal/reflection_test.py
View file @
b70e5866
...
...
@@ -1556,7 +1556,6 @@ class ReflectionTest(basetest.TestCase):
def
assertNotInitialized
(
self
,
proto
):
self
.
assertFalse
(
proto
.
IsInitialized
())
self
.
assertRaises
(
message
.
EncodeError
,
proto
.
SerializeToString
)
# "Partial" serialization doesn't care if message is uninitialized.
proto
.
SerializePartialToString
()
...
...
@@ -2491,11 +2490,6 @@ class SerializationTest(basetest.TestCase):
def
testSerializeUninitialized
(
self
):
proto
=
unittest_pb2
.
TestRequired
()
self
.
_CheckRaises
(
message
.
EncodeError
,
proto
.
SerializeToString
,
'Message protobuf_unittest.TestRequired is missing required fields: '
'a,b,c'
)
# Shouldn't raise exceptions.
partial
=
proto
.
SerializePartialToString
()
...
...
@@ -2506,18 +2500,10 @@ class SerializationTest(basetest.TestCase):
self
.
assertFalse
(
proto2
.
HasField
(
'a'
))
proto
.
a
=
1
self
.
_CheckRaises
(
message
.
EncodeError
,
proto
.
SerializeToString
,
'Message protobuf_unittest.TestRequired is missing required fields: b,c'
)
# Shouldn't raise exceptions.
partial
=
proto
.
SerializePartialToString
()
proto
.
b
=
2
self
.
_CheckRaises
(
message
.
EncodeError
,
proto
.
SerializeToString
,
'Message protobuf_unittest.TestRequired is missing required fields: c'
)
# Shouldn't raise exceptions.
partial
=
proto
.
SerializePartialToString
()
...
...
@@ -2547,12 +2533,6 @@ class SerializationTest(basetest.TestCase):
proto
.
SerializeToString
()
proto
.
optional_message
.
a
=
1
self
.
_CheckRaises
(
message
.
EncodeError
,
proto
.
SerializeToString
,
'Message protobuf_unittest.TestRequiredForeign '
'is missing required fields: '
'optional_message.b,optional_message.c'
)
proto
.
optional_message
.
b
=
2
proto
.
optional_message
.
c
=
3
...
...
@@ -2560,12 +2540,6 @@ class SerializationTest(basetest.TestCase):
proto
.
repeated_message
.
add
()
.
a
=
1
proto
.
repeated_message
.
add
()
.
b
=
2
self
.
_CheckRaises
(
message
.
EncodeError
,
proto
.
SerializeToString
,
'Message protobuf_unittest.TestRequiredForeign is missing required fields: '
'repeated_message[0].b,repeated_message[0].c,'
'repeated_message[1].a,repeated_message[1].c'
)
proto
.
repeated_message
[
0
]
.
b
=
2
proto
.
repeated_message
[
0
]
.
c
=
3
...
...
python/google/protobuf/
internal
/descriptor_cpp2_test.py
→
python/google/protobuf/
pyext
/descriptor_cpp2_test.py
View file @
b70e5866
File moved
python/google/protobuf/
internal
/message_factory_cpp2_test.py
→
python/google/protobuf/
pyext
/message_factory_cpp2_test.py
View file @
b70e5866
File moved
python/google/protobuf/
internal
/reflection_cpp2_generated_test.py
→
python/google/protobuf/
pyext
/reflection_cpp2_generated_test.py
View file @
b70e5866
File moved
python/setup.py
View file @
b70e5866
...
...
@@ -122,12 +122,10 @@ class build_py(_build_py):
if
__name__
==
'__main__'
:
# C++ implementation extension
nocpp
=
'--nocpp_implementation'
if
nocpp
in
sys
.
argv
:
ext_module_list
=
[]
sys
.
argv
.
remove
(
nocpp
)
else
:
nocpp
=
False
cpp_impl
=
'--cpp_implementation'
if
cpp_impl
in
sys
.
argv
:
sys
.
argv
.
remove
(
cpp_impl
)
test_dir
=
"google/protobuf/pyext"
ext_module_list
=
[
Extension
(
"google.protobuf.pyext._message"
,
[
"google/protobuf/pyext/descriptor.cc"
,
...
...
@@ -140,12 +138,16 @@ if __name__ == '__main__':
libraries
=
[
"protobuf"
],
library_dirs
=
[
'../src/.libs'
],
)]
else
:
test_dir
=
"google/protobuf/internal"
ext_module_list
=
[]
setup
(
name
=
'protobuf'
,
version
=
'2.6-pre'
,
packages
=
[
'google'
],
namespace_packages
=
[
'google'
],
google_test_dir
=
"google/protobuf/internal"
,
google_test_dir
=
test_dir
,
# Must list modules explicitly so that we don't install tests.
py_modules
=
[
'google.protobuf.internal.api_implementation'
,
...
...
@@ -182,5 +184,4 @@ if __name__ == '__main__':
description
=
'Protocol Buffers'
,
long_description
=
"Protocol Buffers are Google's data interchange format."
,
use_2to3
=
True
,
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment