1# begin:github_only 2 3def pyproto_test_wrapper(name, deps = []): 4 src = name + "_wrapper.py" 5 native.py_test( 6 name = name, 7 srcs = [src], 8 legacy_create_init = False, 9 main = src, 10 data = ["@com_google_protobuf//src/google/protobuf:testdata"], 11 deps = [ 12 "//python:_message", 13 "@com_google_protobuf//:python_common_test_protos", 14 "@com_google_protobuf//:python_specific_test_protos", 15 "@com_google_protobuf//:python_test_srcs", 16 "@com_google_protobuf//:python_srcs", 17 ] + deps, 18 target_compatible_with = select({ 19 "@system_python//:supported": [], 20 "//conditions:default": ["@platforms//:incompatible"], 21 }), 22 ) 23 24# end:github_only 25 26# begin:google_only 27# 28# def pyproto_test_wrapper(name): 29# src = name + "_wrapper.py" 30# native.py_test( 31# name = name, 32# srcs = [src], 33# main = src, 34# deps = [ 35# "//third_party/py/google/protobuf/internal:" + name + "_for_deps", 36# "//net/proto2/python/public:use_upb_protos", 37# ], 38# target_compatible_with = select({ 39# "@platforms//os:windows": ["@platforms//:incompatible"], 40# "//conditions:default": [], 41# }), 42# ) 43# 44# end:google_only 45