1licenses(["notice"]) 2 3py_library( 4 name = "app", 5 srcs = [ 6 "app.py", 7 ], 8 srcs_version = "PY2AND3", 9 visibility = ["//visibility:public"], 10 deps = [ 11 ":command_name", 12 "//absl/flags", 13 "//absl/logging", 14 ], 15) 16 17py_library( 18 name = "command_name", 19 srcs = ["command_name.py"], 20 srcs_version = "PY2AND3", 21 visibility = ["//visibility:public"], 22) 23 24py_library( 25 name = "tests/app_test_helper", 26 testonly = 1, 27 srcs = ["tests/app_test_helper.py"], 28 srcs_version = "PY2AND3", 29 deps = [ 30 ":app", 31 "//absl/flags", 32 ], 33) 34 35py_binary( 36 name = "tests/app_test_helper_pure_python", 37 testonly = 1, 38 srcs = ["tests/app_test_helper.py"], 39 main = "tests/app_test_helper.py", 40 python_version = "PY3", 41 srcs_version = "PY3", 42 deps = [ 43 ":app", 44 "//absl/flags", 45 ], 46) 47 48py_test( 49 name = "tests/app_test", 50 srcs = ["tests/app_test.py"], 51 data = [":tests/app_test_helper_pure_python"], 52 python_version = "PY3", 53 srcs_version = "PY3", 54 deps = [ 55 ":app", 56 ":tests/app_test_helper", 57 "//absl/flags", 58 "//absl/testing:_bazelize_command", 59 "//absl/testing:absltest", 60 "//absl/testing:flagsaver", 61 ], 62) 63 64py_test( 65 name = "tests/command_name_test", 66 srcs = ["tests/command_name_test.py"], 67 python_version = "PY3", 68 srcs_version = "PY3", 69 deps = [ 70 ":command_name", 71 "//absl/testing:absltest", 72 ], 73) 74 75py_test( 76 name = "tests/python_version_test", 77 srcs = ["tests/python_version_test.py"], 78 python_version = "PY3", 79 srcs_version = "PY3", 80 deps = [ 81 "//absl/flags", 82 "//absl/testing:absltest", 83 ], 84) 85