1load("//bazel:python_rules.bzl", "py2and3_test") 2 3package(default_visibility = ["//visibility:public"]) 4 5GRPCIO_TESTS_UNIT = [ 6 "_abort_test.py", 7 "_api_test.py", 8 "_auth_context_test.py", 9 "_auth_test.py", 10 "_version_test.py", 11 "_channel_args_test.py", 12 "_channel_close_test.py", 13 "_channel_connectivity_test.py", 14 "_channel_ready_future_test.py", 15 "_compression_test.py", 16 "_contextvars_propagation_test.py", 17 "_credentials_test.py", 18 "_dns_resolver_test.py", 19 "_empty_message_test.py", 20 "_error_message_encoding_test.py", 21 # TODO(https://github.com/grpc/grpc/issues/20385) enable this test 22 # "_exit_test.py", 23 "_grpc_shutdown_test.py", 24 "_interceptor_test.py", 25 "_invalid_metadata_test.py", 26 "_invocation_defects_test.py", 27 "_local_credentials_test.py", 28 "_logging_test.py", 29 "_metadata_flags_test.py", 30 "_metadata_code_details_test.py", 31 "_metadata_test.py", 32 "_reconnect_test.py", 33 "_resource_exhausted_test.py", 34 "_rpc_test.py", 35 "_signal_handling_test.py", 36 # TODO(ghostwriternr): To be added later. 37 # "_server_ssl_cert_config_test.py", 38 "_server_test.py", 39 "_server_shutdown_test.py", 40 "_server_wait_for_termination_test.py", 41 "_session_cache_test.py", 42] 43 44py_library( 45 name = "_tcp_proxy", 46 srcs = ["_tcp_proxy.py"], 47) 48 49py_library( 50 name = "_signal_client", 51 srcs = ["_signal_client.py"], 52) 53 54py_library( 55 name = "resources", 56 srcs = ["resources.py"], 57 data = [ 58 "//src/python/grpcio_tests/tests/unit/credentials", 59 ], 60) 61 62py_library( 63 name = "test_common", 64 srcs = ["test_common.py"], 65) 66 67py_library( 68 name = "thread_pool", 69 srcs = ["thread_pool.py"], 70) 71 72py_library( 73 name = "_exit_scenarios", 74 srcs = ["_exit_scenarios.py"], 75) 76 77py_library( 78 name = "_server_shutdown_scenarios", 79 srcs = ["_server_shutdown_scenarios.py"], 80) 81 82py_library( 83 name = "_from_grpc_import_star", 84 srcs = ["_from_grpc_import_star.py"], 85) 86 87[ 88 py2and3_test( 89 name = test_file_name[:-3], 90 size = "small", 91 srcs = [test_file_name], 92 data = [ 93 "//src/python/grpcio_tests/tests/unit/credentials", 94 ], 95 imports = ["../../"], 96 main = test_file_name, 97 deps = [ 98 ":_exit_scenarios", 99 ":_from_grpc_import_star", 100 ":_server_shutdown_scenarios", 101 ":_signal_client", 102 ":_tcp_proxy", 103 ":resources", 104 ":test_common", 105 ":thread_pool", 106 "//src/python/grpcio/grpc:grpcio", 107 "//src/python/grpcio_tests/tests/testing", 108 "//src/python/grpcio_tests/tests/unit/framework/common", 109 "@six", 110 ], 111 ) 112 for test_file_name in GRPCIO_TESTS_UNIT 113] 114