Files
rk35xx-android14/build/soong/python/tests/proto_pkg_path/main.py
T
hmz007 36ed224bac Rockchip Anroid14_SDK 20240628-rkr5 (2556df1a)
Signed-off-by: hmz007 <hmz007@gmail.com>
Change-Id: Ib87fdbe7a0be7dc961af3500fe9ea4589a127f9f
2024-10-29 18:12:02 +08:00

19 lines
493 B
Python

import sys
import unittest
import mylib.subpackage.proto.test_pb2 as test_pb2
import mylib.subpackage.proto.common_pb2 as common_pb2
print(sys.path)
class TestProtoWithPkgPath(unittest.TestCase):
def test_main(self):
x = test_pb2.MyMessage(name="foo",
common = common_pb2.MyCommonMessage(common="common"))
self.assertEqual(x.name, "foo")
self.assertEqual(x.common.common, "common")
if __name__ == '__main__':
unittest.main()