Disable grpc_status_test for sync stack in Python2 (#27374)

* Disable grpc_status_test for sync stack in Python2

* Correct the if condition

* Also disable this test in Bazel

* Clean the unnecessary import in BUILD
pull/27369/head v1.41.0-pre1
Lidi Zheng 3 years ago committed by GitHub
parent f99c193d72
commit 46257815d4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      src/python/grpcio_tests/tests/status/BUILD.bazel
  2. 3
      src/python/grpcio_tests/tests/status/_grpc_status_test.py

@ -12,16 +12,16 @@
# See the License for the specific language governing permissions and
# limitations under the License.
load("@grpc_python_dependencies//:requirements.bzl", "requirement")
load("//bazel:python_rules.bzl", "py2and3_test")
package(default_visibility = ["//visibility:public"])
py2and3_test(
py_test(
name = "grpc_status_test",
size = "small",
srcs = ["_grpc_status_test.py"],
imports = ["../../"],
main = "_grpc_status_test.py",
python_version = "PY3",
deps = [
"//src/python/grpcio/grpc:grpcio",
"//src/python/grpcio_status/grpc_status",

@ -28,6 +28,7 @@ import unittest
import logging
import traceback
import sys
import grpc
from grpc_status import rpc_status
@ -113,6 +114,8 @@ class _GenericHandler(grpc.GenericRpcHandler):
return None
@unittest.skipIf(sys.version_info[0] < 3,
'ProtoBuf descriptor has moved on from Python2')
class StatusTest(unittest.TestCase):
def setUp(self):

Loading…
Cancel
Save