当前位置: 首页>>代码示例>>Python>>正文


Python wstool_cli.WstoolCLI类代码示例

本文整理汇总了Python中wstool.wstool_cli.WstoolCLI的典型用法代码示例。如果您正苦于以下问题:Python WstoolCLI类的具体用法?Python WstoolCLI怎么用?Python WstoolCLI使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了WstoolCLI类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_wstool_info_svn

    def test_wstool_info_svn(self):
        cmd = ["wstool", "info", "-t", "ws"]
        os.chdir(self.test_root_path)
        sys.stdout = output = StringIO()
        wstool_main(cmd)
        output = output.getvalue()
        tokens = _nth_line_split(-2, output)
        self.assertEqual(['clone', 'M', 'svn'], tokens[0:3])

        cli = WstoolCLI()
        self.assertEqual(0, cli.cmd_info(os.path.join(self.test_root_path, 'ws'), []))
开发者ID:jpgr87,项目名称:wstool,代码行数:11,代码来源:test_diff_functions_svn.py

示例2: test_wstool_status_hg_untracked

    def test_wstool_status_hg_untracked(self):
        """Test untracked status output for hg when run outside workspace"""
        cmd = ["wstool", "status", "-t", "ws", "--untracked"]
        os.chdir(self.test_root_path)
        sys.stdout = output = StringIO()
        wstool_main(cmd)
        sys.stdout = sys.__stdout__
        output = output.getvalue()
        self.assertEqual('M       clone/modified-fs.txt\nM       clone/modified.txt\nA       clone/added.txt\nR       clone/deleted.txt\n!       clone/deleted-fs.txt\n?       clone/added-fs.txt\n', output)

        cli = WstoolCLI()
        self.assertEqual(0, cli.cmd_status(os.path.join(self.test_root_path, 'ws'), ["--untracked"]))
开发者ID:cbandera,项目名称:wstool,代码行数:12,代码来源:test_diff_functions_hg.py

示例3: test_wstool_diff_bzr_outside

    def test_wstool_diff_bzr_outside(self):
        """Test diff output for bzr when run outside workspace"""
        cmd = ["wstool", "diff", "-t", "ws"]
        os.chdir(self.test_root_path)
        sys.stdout = output = StringIO()
        wstool_main(cmd)
        sys.stdout = sys.__stdout__
        output = output.getvalue()
        self.check_diff_output(output)

        cli = WstoolCLI()
        self.assertEqual(0, cli.cmd_diff(os.path.join(self.test_root_path, 'ws'), []))
开发者ID:NikolausDemmel,项目名称:wstool,代码行数:12,代码来源:test_diff_functions_bzr.py

示例4: test_wstool_status_svn_outside

    def test_wstool_status_svn_outside(self):
        """Test status output for svn when run outside workspace"""

        cmd = ["wstool", "status", "-t", "ws"]
        os.chdir(self.test_root_path)
        sys.stdout = output = StringIO()
        wstool_main(cmd)
        sys.stdout = sys.__stdout__
        output = output.getvalue()
        self.assertStatusListEqual('A       clone/added.txt\nD       clone/deleted.txt\n!       clone/deleted-fs.txt\nM       clone/modified.txt\n', output)

        cli = WstoolCLI()
        self.assertEqual(0, cli.cmd_status(os.path.join(self.test_root_path, 'ws'), []))
开发者ID:jpgr87,项目名称:wstool,代码行数:13,代码来源:test_diff_functions_svn.py

示例5: test_wstool_diff_git_inside

    def test_wstool_diff_git_inside(self):
        """Test diff output for git when run inside workspace"""
        directory = self.test_root_path + "/ws"
        cmd = ["wstool", "diff"]
        os.chdir(directory)
        sys.stdout = output = StringIO()
        wstool_main(cmd)
        output = output.getvalue()
        sys.stdout = sys.__stdout__
        self.check_diff_output(output)

        cli = WstoolCLI()
        self.assertEqual(0, cli.cmd_diff(directory, []))
开发者ID:NikolausDemmel,项目名称:wstool,代码行数:13,代码来源:test_diff_functions_git.py

示例6: test_wstool_status_hg_inside

    def test_wstool_status_hg_inside(self):
        """Test status output for hg when run inside workspace"""
        directory = self.test_root_path + "/ws"

        cmd = ["wstool", "status"]
        os.chdir(directory)
        sys.stdout = output = StringIO()
        wstool_main(cmd)
        output = output.getvalue()
        sys.stdout = sys.__stdout__
        self.assertEqual('M       clone/modified-fs.txt\nM       clone/modified.txt\nA       clone/added.txt\nR       clone/deleted.txt\n!       clone/deleted-fs.txt\n', output)

        cli = WstoolCLI()
        self.assertEqual(0, cli.cmd_diff(directory, []))
开发者ID:cbandera,项目名称:wstool,代码行数:14,代码来源:test_diff_functions_hg.py


注:本文中的wstool.wstool_cli.WstoolCLI类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。