本文整理汇总了Python中qisrc.test.conftest.TestGit.log方法的典型用法代码示例。如果您正苦于以下问题:Python TestGit.log方法的具体用法?Python TestGit.log怎么用?Python TestGit.log使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类qisrc.test.conftest.TestGit
的用法示例。
在下文中一共展示了TestGit.log方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_happy_rebase
# 需要导入模块: from qisrc.test.conftest import TestGit [as 别名]
# 或者: from qisrc.test.conftest.TestGit import log [as 别名]
def test_happy_rebase(git_server, qisrc_action):
git_server.create_repo("foo")
git_server.switch_manifest_branch("devel")
git_server.change_branch("foo", "devel")
qisrc_action("init", git_server.manifest_url, "--branch", "devel")
git_server.push_file("foo", "master.txt", "master")
git_worktree = TestGitWorkTree()
foo_proj = git_worktree.get_git_project("foo")
git = TestGit(foo_proj.path)
git.commit_file("devel.txt", "devel")
git.push()
git.fetch()
qisrc_action("rebase", "--branch", "master", "--all")
rc, out = git.log("--pretty=oneline", raises=False)
assert len(out.splitlines()) == 3
示例2: test_when_moved
# 需要导入模块: from qisrc.test.conftest import TestGit [as 别名]
# 或者: from qisrc.test.conftest.TestGit import log [as 别名]
def test_when_moved(git_server, qisrc_action, record_messages):
""" Test When Moved """
git_server.create_repo("foo")
git_server.switch_manifest_branch("devel")
git_server.change_branch("foo", "devel")
git_server.move_repo("foo", "lib/foo")
qisrc_action("init", git_server.manifest_url, "--branch", "devel")
git_server.push_file("foo", "master.txt", "master")
git_worktree = TestGitWorkTree()
foo_proj = git_worktree.get_git_project("lib/foo")
git = TestGit(foo_proj.path)
git.commit_file("devel.txt", "devel")
git.push()
qisrc_action("rebase", "--branch", "master", "--all")
_rc, out = git.log("--pretty=oneline", raises=False)
assert len(out.splitlines()) == 3