本文整理汇总了Python中wstool.wstool_cli.WstoolCLI.cmd_diff方法的典型用法代码示例。如果您正苦于以下问题:Python WstoolCLI.cmd_diff方法的具体用法?Python WstoolCLI.cmd_diff怎么用?Python WstoolCLI.cmd_diff使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wstool.wstool_cli.WstoolCLI
的用法示例。
在下文中一共展示了WstoolCLI.cmd_diff方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_wstool_diff_bzr_outside
# 需要导入模块: from wstool.wstool_cli import WstoolCLI [as 别名]
# 或者: from wstool.wstool_cli.WstoolCLI import cmd_diff [as 别名]
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'), []))
示例2: test_wstool_diff_git_inside
# 需要导入模块: from wstool.wstool_cli import WstoolCLI [as 别名]
# 或者: from wstool.wstool_cli.WstoolCLI import cmd_diff [as 别名]
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, []))
示例3: test_wstool_status_hg_inside
# 需要导入模块: from wstool.wstool_cli import WstoolCLI [as 别名]
# 或者: from wstool.wstool_cli.WstoolCLI import cmd_diff [as 别名]
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, []))