Fix the import order to make hack work

pull/18488/head
Lidi Zheng 6 years ago
parent 85bcce2e08
commit 93bab217be
  1. 16
      examples/python/errors/test/_error_handling_example_test.py

@ -13,6 +13,14 @@
# limitations under the License.
"""Tests of the error handling example."""
# NOTE(lidiz) This module only exists in Bazel BUILD file, for more details
# please refer to comments in the "bazel_namespace_package_hack" module.
try:
from tests import bazel_namespace_package_hack
bazel_namespace_package_hack.sys_path_to_site_dir_hack()
except ImportError:
pass
import unittest
import logging
@ -22,14 +30,6 @@ from examples.protos import helloworld_pb2_grpc
from examples.python.errors import client as error_handling_client
from examples.python.errors import server as error_handling_server
# NOTE(lidiz) This module only exists in Bazel BUILD file, for more details
# please refer to comments in the "bazel_namespace_package_hack" module.
try:
from tests import bazel_namespace_package_hack
bazel_namespace_package_hack.sys_path_to_site_dir_hack()
except ImportError:
pass
class ErrorHandlingExampleTest(unittest.TestCase):

Loading…
Cancel
Save