File tree Expand file tree Collapse file tree 4 files changed +12
-8
lines changed
Expand file tree Collapse file tree 4 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -273,8 +273,8 @@ py_test(
273273
274274# Externally this is currently only built but not used.
275275pybind_extension (
276- name = "very_large_proto_module " ,
277- srcs = ["very_large_proto_module .cc" ],
276+ name = "pass_proto2_message_module " ,
277+ srcs = ["pass_proto2_message_module .cc" ],
278278 deps = [
279279 "//pybind11_protobuf:native_proto_caster" ,
280280 "@com_google_protobuf//:protobuf" ,
@@ -394,7 +394,7 @@ py_test(
394394 name = "we_love_dashes_py_only_test" ,
395395 srcs = ["we_love_dashes_py_only_test.py" ],
396396 deps = [
397- ":very_large_proto_module " ,
397+ ":pass_proto2_message_module " ,
398398 ":we-love-dashes_py_pb2" ,
399399 "@com_google_absl_py//absl/testing:absltest" ,
400400 "@com_google_protobuf//:protobuf_python" ,
Original file line number Diff line number Diff line change 1010#include " google/protobuf/message.h"
1111#include " pybind11_protobuf/native_proto_caster.h"
1212
13- PYBIND11_MODULE (very_large_proto_module , m) {
13+ PYBIND11_MODULE (pass_proto2_message_module , m) {
1414 pybind11_protobuf::ImportNativeProtoCasters ();
1515
1616 m.def (" get_space_used_estimate" ,
Original file line number Diff line number Diff line change 55
66from absl .testing import absltest
77
8+ from pybind11_protobuf .tests import pass_proto2_message_module
89from pybind11_protobuf .tests import test_pb2
9- from pybind11_protobuf .tests import very_large_proto_module as m
1010
1111
1212class MessageTest (absltest .TestCase ):
@@ -18,7 +18,9 @@ def test_greater_than_2gb_limit(self):
1818 kb = 1024
1919 msg_size = 2 * kb ** 3 + kb # A little over 2 GB.
2020 msg = test_pb2 .TestMessage (string_value = 'x' * msg_size )
21- space_used_estimate = m .get_space_used_estimate (msg )
21+ space_used_estimate = pass_proto2_message_module .get_space_used_estimate (
22+ msg
23+ )
2224 self .assertGreater (space_used_estimate , msg_size )
2325
2426
Original file line number Diff line number Diff line change 55
66from absl .testing import absltest
77
8- from pybind11_protobuf .tests import very_large_proto_module
8+ from pybind11_protobuf .tests import pass_proto2_message_module
99from pybind11_protobuf .tests import we_love_dashes_pb2
1010
1111
1212class MessageTest (absltest .TestCase ):
1313
1414 def test_pass_proto2_message (self ):
1515 msg = we_love_dashes_pb2 .TokenEffort (score = 345 )
16- space_used_estimate = very_large_proto_module .get_space_used_estimate (msg )
16+ space_used_estimate = pass_proto2_message_module .get_space_used_estimate (
17+ msg
18+ )
1719 self .assertGreater (space_used_estimate , 0 )
1820
1921
You can’t perform that action at this time.
0 commit comments