Example #1
0
    def _sys_path_with_modifications(self, is_completion):
        if self._fixed_sys_path is not None:
            return self._fixed_sys_path

        return (
            # For import completions we don't want to see init paths, but for
            # inference we want to show the user as much as possible.
            # See GH #1446.
            self._inference_state.get_sys_path(add_init_paths=not is_completion
                                               ) +
            sys_path.check_sys_path_modifications(self._module_context))
def check_module_test(Script, code):
    module_context = Script(code)._get_module_context()
    return check_sys_path_modifications(module_context)