本文整理汇总了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"]))
示例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'), []))
示例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, []))
示例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, []))