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


Python WstoolCLI.cmd_status方法代码示例

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


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

示例1: test_wstool_status_hg_untracked

# 需要导入模块: from wstool.wstool_cli import WstoolCLI [as 别名]
# 或者: from wstool.wstool_cli.WstoolCLI import cmd_status [as 别名]
    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,代码行数:14,代码来源:test_diff_functions_hg.py

示例2: test_wstool_status_svn_outside

# 需要导入模块: from wstool.wstool_cli import WstoolCLI [as 别名]
# 或者: from wstool.wstool_cli.WstoolCLI import cmd_status [as 别名]
    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,代码行数:15,代码来源:test_diff_functions_svn.py

示例3: test_wstool_diff_svn_inside

# 需要导入模块: from wstool.wstool_cli import WstoolCLI [as 别名]
# 或者: from wstool.wstool_cli.WstoolCLI import cmd_status [as 别名]
    def test_wstool_diff_svn_inside(self):
        """Test diff output for svn 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_status(directory, []))
开发者ID:jpgr87,项目名称:wstool,代码行数:16,代码来源:test_diff_functions_svn.py

示例4: test_wstool_status_bzr_inside

# 需要导入模块: from wstool.wstool_cli import WstoolCLI [as 别名]
# 或者: from wstool.wstool_cli.WstoolCLI import cmd_status [as 别名]
    def test_wstool_status_bzr_inside(self):
        """Test status output for bzr 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('+N      clone/added.txt\n D      clone/deleted-fs.txt\n-D      clone/deleted.txt\n M      clone/modified-fs.txt\n M      clone/modified.txt\n', output)

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


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