1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106
|
load("@rules_python//python:py_library.bzl", "py_library")
load("@rules_python//python:py_test.bzl", "py_test")
load("@rules_python//python:py_binary.bzl", "py_binary")
package(default_visibility = ["//visibility:private"])
licenses(["notice"])
py_library(
name = "logging",
srcs = ["__init__.py"],
srcs_version = "PY2AND3",
visibility = ["//visibility:public"],
deps = [
":converter",
"//absl/flags",
],
)
py_library(
name = "converter",
srcs = ["converter.py"],
srcs_version = "PY2AND3",
visibility = ["//visibility:public"],
)
py_test(
name = "tests/converter_test",
size = "small",
srcs = ["tests/converter_test.py"],
python_version = "PY3",
srcs_version = "PY3",
deps = [
":converter",
":logging",
"//absl/testing:absltest",
],
)
py_test(
name = "tests/logging_test",
size = "small",
srcs = ["tests/logging_test.py"],
python_version = "PY3",
srcs_version = "PY3",
deps = [
":logging",
"//absl/flags",
"//absl/testing:absltest",
"//absl/testing:flagsaver",
"//absl/testing:parameterized",
],
)
py_test(
name = "tests/log_before_import_test",
srcs = ["tests/log_before_import_test.py"],
main = "tests/log_before_import_test.py",
python_version = "PY3",
srcs_version = "PY3",
deps = [
":logging",
"//absl/testing:absltest",
],
)
py_test(
name = "tests/verbosity_flag_test",
srcs = ["tests/verbosity_flag_test.py"],
python_version = "PY3",
srcs_version = "PY3",
deps = [
":logging",
"//absl/flags",
"//absl/testing:absltest",
],
)
py_binary(
name = "tests/logging_functional_test_helper",
testonly = 1,
srcs = ["tests/logging_functional_test_helper.py"],
python_version = "PY3",
srcs_version = "PY3",
deps = [
":logging",
"//absl:app",
"//absl/flags",
],
)
py_test(
name = "tests/logging_functional_test",
size = "large",
srcs = ["tests/logging_functional_test.py"],
data = [":tests/logging_functional_test_helper"],
python_version = "PY3",
shard_count = 50,
srcs_version = "PY3",
deps = [
":logging",
"//absl/testing:_bazelize_command",
"//absl/testing:absltest",
"//absl/testing:parameterized",
],
)
|