Python setuptools.command.easy_install 模块,nt_quote_arg() 实例源码

我们从Python开源项目中,提取了以下12个代码示例,用于说明如何使用setuptools.command.easy_install.nt_quote_arg()

项目:Sudoku-Solver    作者:ayush1997    | 项目源码 | 文件源码
def test_get_script_header(self):
        expected = '#!%s\n' % ei.nt_quote_arg(os.path.normpath(sys.executable))
        actual = ei.ScriptWriter.get_script_header('#!/usr/local/bin/python')
        assert actual == expected

        expected = '#!%s -x\n' % ei.nt_quote_arg(os.path.normpath
            (sys.executable))
        actual = ei.ScriptWriter.get_script_header('#!/usr/bin/python -x')
        assert actual == expected

        actual = ei.ScriptWriter.get_script_header('#!/usr/bin/python',
            executable=self.non_ascii_exe)
        expected = '#!%s -x\n' % self.non_ascii_exe
        assert actual == expected

        actual = ei.ScriptWriter.get_script_header('#!/usr/bin/python',
            executable='"'+self.exe_with_spaces+'"')
        expected = '#!"%s"\n' % self.exe_with_spaces
        assert actual == expected
项目:facebook-face-recognition    作者:mathur    | 项目源码 | 文件源码
def test_get_script_header(self):
        expected = '#!%s\n' % ei.nt_quote_arg(os.path.normpath(sys.executable))
        actual = ei.ScriptWriter.get_script_header('#!/usr/local/bin/python')
        assert actual == expected

        expected = '#!%s -x\n' % ei.nt_quote_arg(os.path.normpath
            (sys.executable))
        actual = ei.ScriptWriter.get_script_header('#!/usr/bin/python -x')
        assert actual == expected

        actual = ei.ScriptWriter.get_script_header('#!/usr/bin/python',
            executable=self.non_ascii_exe)
        expected = '#!%s -x\n' % self.non_ascii_exe
        assert actual == expected

        actual = ei.ScriptWriter.get_script_header('#!/usr/bin/python',
            executable='"'+self.exe_with_spaces+'"')
        expected = '#!"%s"\n' % self.exe_with_spaces
        assert actual == expected
项目:MyFriend-Rob    作者:lcheniv    | 项目源码 | 文件源码
def test_get_script_header(self):
        expected = '#!%s\n' % ei.nt_quote_arg(os.path.normpath(sys.executable))
        actual = ei.ScriptWriter.get_script_header('#!/usr/local/bin/python')
        assert actual == expected

        expected = '#!%s -x\n' % ei.nt_quote_arg(os.path.normpath
            (sys.executable))
        actual = ei.ScriptWriter.get_script_header('#!/usr/bin/python -x')
        assert actual == expected

        actual = ei.ScriptWriter.get_script_header('#!/usr/bin/python',
            executable=self.non_ascii_exe)
        expected = '#!%s -x\n' % self.non_ascii_exe
        assert actual == expected

        actual = ei.ScriptWriter.get_script_header('#!/usr/bin/python',
            executable='"'+self.exe_with_spaces+'"')
        expected = '#!"%s"\n' % self.exe_with_spaces
        assert actual == expected
项目:Sudoku-Solver    作者:ayush1997    | 项目源码 | 文件源码
def prep_script(cls, template):
        python_exe = nt_quote_arg(sys.executable)
        return template % locals()
项目:setuptools    作者:pypa    | 项目源码 | 文件源码
def prep_script(cls, template):
        python_exe = nt_quote_arg(sys.executable)
        return template % locals()
项目:setuptools    作者:pypa    | 项目源码 | 文件源码
def test_get_script_header(self):
        expected = '#!%s\n' % ei.nt_quote_arg(os.path.normpath(sys.executable))
        actual = ei.ScriptWriter.get_script_header('#!/usr/local/bin/python')
        assert actual == expected
项目:setuptools    作者:pypa    | 项目源码 | 文件源码
def test_get_script_header_args(self):
        expected = '#!%s -x\n' % ei.nt_quote_arg(os.path.normpath
            (sys.executable))
        actual = ei.ScriptWriter.get_script_header('#!/usr/bin/python -x')
        assert actual == expected
项目:browser_vuln_check    作者:lcatro    | 项目源码 | 文件源码
def prep_script(cls, template):
        python_exe = nt_quote_arg(sys.executable)
        return template % locals()
项目:browser_vuln_check    作者:lcatro    | 项目源码 | 文件源码
def test_get_script_header(self):
        expected = '#!%s\n' % ei.nt_quote_arg(os.path.normpath(sys.executable))
        actual = ei.ScriptWriter.get_script_header('#!/usr/local/bin/python')
        assert actual == expected
项目:browser_vuln_check    作者:lcatro    | 项目源码 | 文件源码
def test_get_script_header_args(self):
        expected = '#!%s -x\n' % ei.nt_quote_arg(os.path.normpath
            (sys.executable))
        actual = ei.ScriptWriter.get_script_header('#!/usr/bin/python -x')
        assert actual == expected
项目:facebook-face-recognition    作者:mathur    | 项目源码 | 文件源码
def prep_script(cls, template):
        python_exe = nt_quote_arg(sys.executable)
        return template % locals()
项目:MyFriend-Rob    作者:lcheniv    | 项目源码 | 文件源码
def prep_script(cls, template):
        python_exe = nt_quote_arg(sys.executable)
        return template % locals()