1load("@rules_python//python:py_library.bzl", "py_library") 2load("@rules_python//python:py_test.bzl", "py_test") 3load("@rules_python//python:py_binary.bzl", "py_binary") 4 5package(default_visibility = ["//visibility:private"]) 6 7licenses(["notice"]) 8 9py_library( 10 name = "absltest", 11 srcs = ["absltest.py"], 12 srcs_version = "PY2AND3", 13 visibility = ["//visibility:public"], 14 deps = [ 15 ":_pretty_print_reporter", 16 ":xml_reporter", 17 "//absl:app", 18 "//absl/flags", 19 "//absl/logging", 20 ], 21) 22 23py_library( 24 name = "flagsaver", 25 srcs = ["flagsaver.py"], 26 srcs_version = "PY2AND3", 27 visibility = ["//visibility:public"], 28 deps = [ 29 "//absl/flags", 30 ], 31) 32 33py_library( 34 name = "parameterized", 35 srcs = [ 36 "parameterized.py", 37 ], 38 srcs_version = "PY2AND3", 39 visibility = ["//visibility:public"], 40 deps = [ 41 ":absltest", 42 ], 43) 44 45py_library( 46 name = "xml_reporter", 47 srcs = ["xml_reporter.py"], 48 srcs_version = "PY2AND3", 49 visibility = ["//visibility:public"], 50 deps = [ 51 ":_pretty_print_reporter", 52 ], 53) 54 55py_library( 56 name = "_bazelize_command", 57 testonly = 1, 58 srcs = ["_bazelize_command.py"], 59 srcs_version = "PY2AND3", 60 visibility = ["//:__subpackages__"], 61 deps = [ 62 "//absl/flags", 63 ], 64) 65 66py_library( 67 name = "_pretty_print_reporter", 68 srcs = ["_pretty_print_reporter.py"], 69 srcs_version = "PY2AND3", 70) 71 72py_library( 73 name = "tests/absltest_env", 74 testonly = True, 75 srcs = ["tests/absltest_env.py"], 76) 77 78py_test( 79 name = "tests/absltest_filtering_test", 80 size = "medium", 81 srcs = ["tests/absltest_filtering_test.py"], 82 data = [":tests/absltest_filtering_test_helper"], 83 python_version = "PY3", 84 srcs_version = "PY3", 85 deps = [ 86 ":_bazelize_command", 87 ":absltest", 88 ":parameterized", 89 ":tests/absltest_env", 90 "//absl/logging", 91 ], 92) 93 94py_binary( 95 name = "tests/absltest_filtering_test_helper", 96 testonly = 1, 97 srcs = ["tests/absltest_filtering_test_helper.py"], 98 python_version = "PY3", 99 srcs_version = "PY3", 100 deps = [ 101 ":absltest", 102 ":parameterized", 103 "//absl:app", 104 ], 105) 106 107py_test( 108 name = "tests/absltest_fail_fast_test", 109 size = "small", 110 srcs = ["tests/absltest_fail_fast_test.py"], 111 data = [":tests/absltest_fail_fast_test_helper"], 112 python_version = "PY3", 113 srcs_version = "PY3", 114 deps = [ 115 ":_bazelize_command", 116 ":absltest", 117 ":parameterized", 118 ":tests/absltest_env", 119 "//absl/logging", 120 ], 121) 122 123py_binary( 124 name = "tests/absltest_fail_fast_test_helper", 125 testonly = 1, 126 srcs = ["tests/absltest_fail_fast_test_helper.py"], 127 python_version = "PY3", 128 srcs_version = "PY3", 129 deps = [ 130 ":absltest", 131 "//absl:app", 132 ], 133) 134 135py_test( 136 name = "tests/absltest_randomization_test", 137 size = "medium", 138 srcs = ["tests/absltest_randomization_test.py"], 139 data = [":tests/absltest_randomization_testcase"], 140 python_version = "PY3", 141 srcs_version = "PY3", 142 deps = [ 143 ":_bazelize_command", 144 ":absltest", 145 ":parameterized", 146 ":tests/absltest_env", 147 "//absl/flags", 148 ], 149) 150 151py_binary( 152 name = "tests/absltest_randomization_testcase", 153 testonly = 1, 154 srcs = ["tests/absltest_randomization_testcase.py"], 155 python_version = "PY3", 156 srcs_version = "PY3", 157 deps = [ 158 ":absltest", 159 ], 160) 161 162py_test( 163 name = "tests/absltest_sharding_test", 164 size = "small", 165 srcs = ["tests/absltest_sharding_test.py"], 166 data = [ 167 ":tests/absltest_sharding_test_helper", 168 ":tests/absltest_sharding_test_helper_no_tests", 169 ], 170 python_version = "PY3", 171 srcs_version = "PY3", 172 deps = [ 173 ":_bazelize_command", 174 ":absltest", 175 ":parameterized", 176 ":tests/absltest_env", 177 ], 178) 179 180py_binary( 181 name = "tests/absltest_sharding_test_helper", 182 testonly = 1, 183 srcs = ["tests/absltest_sharding_test_helper.py"], 184 python_version = "PY3", 185 srcs_version = "PY3", 186 deps = [":absltest"], 187) 188 189py_binary( 190 name = "tests/absltest_sharding_test_helper_no_tests", 191 testonly = 1, 192 srcs = ["tests/absltest_sharding_test_helper_no_tests.py"], 193 deps = [":absltest"], 194) 195 196py_test( 197 name = "tests/absltest_test", 198 size = "small", 199 srcs = ["tests/absltest_test.py"], 200 data = [ 201 ":tests/absltest_test_helper", 202 ":tests/absltest_test_helper_skipped", 203 ], 204 python_version = "PY3", 205 srcs_version = "PY3", 206 deps = [ 207 ":_bazelize_command", 208 ":absltest", 209 ":parameterized", 210 ":tests/absltest_env", 211 ], 212) 213 214py_binary( 215 name = "tests/absltest_test_helper", 216 testonly = 1, 217 srcs = ["tests/absltest_test_helper.py"], 218 python_version = "PY3", 219 srcs_version = "PY3", 220 deps = [ 221 ":absltest", 222 "//absl:app", 223 "//absl/flags", 224 ], 225) 226 227py_binary( 228 name = "tests/absltest_test_helper_skipped", 229 testonly = 1, 230 srcs = ["tests/absltest_test_helper_skipped.py"], 231 deps = [":absltest"], 232) 233 234py_test( 235 name = "tests/flagsaver_test", 236 srcs = ["tests/flagsaver_test.py"], 237 python_version = "PY3", 238 srcs_version = "PY3", 239 deps = [ 240 ":absltest", 241 ":flagsaver", 242 ":parameterized", 243 "//absl/flags", 244 ], 245) 246 247py_test( 248 name = "tests/parameterized_test", 249 srcs = ["tests/parameterized_test.py"], 250 python_version = "PY3", 251 srcs_version = "PY3", 252 deps = [ 253 ":absltest", 254 ":parameterized", 255 ], 256) 257 258py_test( 259 name = "tests/xml_reporter_test", 260 srcs = ["tests/xml_reporter_test.py"], 261 data = [":tests/xml_reporter_helper_test"], 262 python_version = "PY3", 263 srcs_version = "PY3", 264 deps = [ 265 ":_bazelize_command", 266 ":absltest", 267 ":parameterized", 268 ":xml_reporter", 269 "//absl/logging", 270 ], 271) 272 273py_binary( 274 name = "tests/xml_reporter_helper_test", 275 testonly = 1, 276 srcs = ["tests/xml_reporter_helper_test.py"], 277 python_version = "PY3", 278 srcs_version = "PY3", 279 deps = [ 280 ":absltest", 281 "//absl/flags", 282 ], 283) 284