Skip to content

Commit b538aff

Browse files
rwgkcopybara-github
authored andcommitted
Rename very_large_proto_module.cc to pass_proto2_message_module.cc
This name makes more sense because the module is used in two tests. No functional changes. PiperOrigin-RevId: 623644578
1 parent b738a25 commit b538aff

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

pybind11_protobuf/tests/BUILD

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -273,8 +273,8 @@ py_test(
273273

274274
# Externally this is currently only built but not used.
275275
pybind_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",

pybind11_protobuf/tests/very_large_proto_module.cc renamed to pybind11_protobuf/tests/pass_proto2_message_module.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
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",

pybind11_protobuf/tests/very_large_proto_test.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66
from absl.testing import absltest
77

8+
from pybind11_protobuf.tests import pass_proto2_message_module
89
from pybind11_protobuf.tests import test_pb2
9-
from pybind11_protobuf.tests import very_large_proto_module as m
1010

1111

1212
class 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

pybind11_protobuf/tests/we_love_dashes_py_only_test.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,17 @@
55

66
from 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
99
from pybind11_protobuf.tests import we_love_dashes_pb2
1010

1111

1212
class 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

0 commit comments

Comments
 (0)