Switch to `py2and3_test` rule from py_test

pull/20150/head
vam-google 5 years ago
parent 564dc771dc
commit dbe62a6e6c
  1. 3
      bazel/test/python_test_repo/.bazelrc
  2. 13
      bazel/test/python_test_repo/BUILD

@ -1,3 +0,0 @@
build:python3 --python_path=python3
build:python3 --python_version=PY3
build:python3 --action_env=PYTHON_BIN_PATH=python3

@ -14,7 +14,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
load("@com_github_grpc_grpc//bazel:python_rules.bzl", "py_proto_library", "py_grpc_library")
load(
"@com_github_grpc_grpc//bazel:python_rules.bzl",
"py_proto_library",
"py_grpc_library",
"py2and3_test",
)
package(default_testonly = 1)
@ -48,7 +53,7 @@ py_proto_library(
deps = ["@com_google_protobuf//:timestamp_proto"],
)
py_test(
py2and3_test(
name = "import_test",
main = "helloworld.py",
srcs = ["helloworld.py"],
@ -58,7 +63,6 @@ py_test(
":duration_py_pb2",
":timestamp_py_pb2",
],
python_version = "PY3",
)
# Test compatibility of py_proto_library and py_grpc_library rules with
@ -86,7 +90,7 @@ py_grpc_library(
deps = [":helloworld_moved_py_pb2"],
)
py_test(
py2and3_test(
name = "import_moved_test",
main = "helloworld_moved.py",
srcs = ["helloworld_moved.py"],
@ -96,5 +100,4 @@ py_test(
":duration_py_pb2",
":timestamp_py_pb2",
],
python_version = "PY3",
)
Loading…
Cancel
Save