diff --git a/src/python/grpcio_tests/tests_py3_only/unit/_simple_stubs_test.py b/src/python/grpcio_tests/tests_py3_only/unit/_simple_stubs_test.py index f7a80081fce..dc6a047f641 100644 --- a/src/python/grpcio_tests/tests_py3_only/unit/_simple_stubs_test.py +++ b/src/python/grpcio_tests/tests_py3_only/unit/_simple_stubs_test.py @@ -337,7 +337,7 @@ class SimpleStubsTest(unittest.TestCase): grpc.ChannelConnectivity.CONNECTING): pass else: - raise AssertionError("Encountered unknown state.") + self.fail("Encountered unknown state.") channel.subscribe(_on_connectivity_changed)