import os import sys sys_path = sys.path try: sys.path = [os.path.dirname(__file__)] + sys.path import wrapper_util finally: sys.path = sys_path wrapper_util.reject_old_python_versions((2, 7)) _DIR_PATH = wrapper_util.get_dir_path(__file__, os.path.join('lib', 'ipaddr')) _PATHS = wrapper_util.Paths(_DIR_PATH) EXTRA_PATHS = _PATHS.v2_extra_paths def fix_sys_path(extra_extra_paths=()): """Fix the sys.path to include our extra paths. fix_sys_path should be called before running testbed-based unit tests so that
# """Convenience wrapper for starting an appengine tool.""" import os import sys sys_path = sys.path try: sys.path = [os.path.dirname(__file__)] + sys.path import wrapper_util finally: sys.path = sys_path wrapper_util.reject_old_python_versions((2, 7)) _DIR_PATH = wrapper_util.get_dir_path(__file__, os.path.join('lib', 'ipaddr')) _PATHS = wrapper_util.Paths(_DIR_PATH) EXTRA_PATHS = _PATHS.v2_extra_paths def fix_sys_path(extra_extra_paths=()): """Fix the sys.path to include our extra paths. fix_sys_path should be called before running testbed-based unit tests so that third-party modules are correctly added to sys.path. """ sys.path[1:1] = EXTRA_PATHS