1"""Wrapper for another py_test to run with upb, possibly with a set of expected failures.""" 2 3load("@rules_python//python:py_test.bzl", "py_test") 4 5def pyproto_test_wrapper(name, deps = []): 6 src = name + "_wrapper.py" 7 py_test( 8 name = name, 9 srcs = [src], 10 legacy_create_init = False, 11 main = src, 12 data = ["//src/google/protobuf:testdata"], 13 deps = [ 14 "//python:_message", 15 "//:python_common_test_protos", 16 "//:python_specific_test_protos", 17 "//:python_test_srcs", 18 "//:python_srcs", 19 ] + deps, 20 target_compatible_with = select({ 21 "@system_python//:supported": [], 22 "//conditions:default": ["@platforms//:incompatible"], 23 }), 24 ) 25