1# Copyright 2021 gRPC authors. 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); 4# you may not use this file except in compliance with the License. 5# You may obtain a copy of the License at 6# 7# http://www.apache.org/licenses/LICENSE-2.0 8# 9# Unless required by applicable law or agreed to in writing, software 10# distributed under the License is distributed on an "AS IS" BASIS, 11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12# See the License for the specific language governing permissions and 13# limitations under the License. 14 15load("@rules_python//python:defs.bzl", "py_library", "py_test") 16 17package(default_visibility = ["//visibility:public"]) 18 19GRPCIO_TESTS_UNIT_CYTHON = [ 20 "_cancel_many_calls_test.py", 21 "_channel_test.py", 22 "_no_messages_server_completion_queue_per_call_test.py", 23 "_no_messages_single_server_completion_queue_test.py", 24 "_read_some_but_not_all_responses_test.py", 25 "_server_test.py", 26 "cygrpc_test.py", 27] 28 29py_library( 30 name = "common", 31 srcs = ["_common.py"], 32) 33 34py_library( 35 name = "test_utilities", 36 srcs = ["test_utilities.py"], 37) 38 39[ 40 py_test( 41 name = test_file_name[:-3], 42 size = "small", 43 srcs = [test_file_name], 44 data = [ 45 "//src/python/grpcio_tests/tests/unit/credentials", 46 ], 47 imports = ["../../../"], 48 main = test_file_name, 49 python_version = "PY3", 50 deps = [ 51 ":common", 52 ":test_utilities", 53 "//src/python/grpcio/grpc:grpcio", 54 "//src/python/grpcio_tests/tests/unit:resources", 55 "//src/python/grpcio_tests/tests/unit:test_common", 56 "//src/python/grpcio_tests/tests/unit/framework/common", 57 ], 58 ) 59 for test_file_name in GRPCIO_TESTS_UNIT_CYTHON 60] 61