Use the correct machanism to ignore test in Windows

pull/20079/head
Lidi Zheng 6 years ago
parent 8f403431a1
commit 630e6ab221
  1. 4
      src/python/grpcio_tests/commands.py
  2. 2
      src/python/grpcio_tests/tests/unit/_local_credentials_test.py

@ -161,8 +161,6 @@ class TestGevent(setuptools.Command):
BANNED_WINDOWS_TESTS = (
# TODO(https://github.com/grpc/grpc/pull/15411) enable this test
'unit._dns_resolver_test.DNSResolverTest.test_connect_loopback',
# TODO(https://github.com/grpc/grpc/issues/20078) enable this test
'unit._local_credentials_test.LocalCredentialsTest.test_local_tcp',
)
description = 'run tests with gevent. Assumes grpc/gevent are installed'
user_options = []
@ -189,7 +187,7 @@ class TestGevent(setuptools.Command):
loader = tests.Loader()
loader.loadTestsFromNames(['tests'])
runner = tests.Runner()
if sys.platform == 'win32':
if os.name == 'nt':
runner.skip_tests(self.BANNED_TESTS + self.BANNED_WINDOWS_TESTS)
else:
runner.skip_tests(self.BANNED_TESTS)

@ -33,6 +33,8 @@ class LocalCredentialsTest(unittest.TestCase):
server.add_generic_rpc_handlers((_GenericHandler(),))
return server
@unittest.skipIf(os.name == 'nt',
'TODO(https://github.com/grpc/grpc/issues/20078)')
def test_local_tcp(self):
server_addr = 'localhost:{}'
channel_creds = grpc.local_channel_credentials(

Loading…
Cancel
Save