Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitf6fdb67

Browse files
Arthur-MilchiorByron
authored andcommitted
Adding test
1 parent4bebfe3 commitf6fdb67

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

‎git/test/test_repo.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1023,3 +1023,25 @@ def test_git_work_tree_env(self, rw_dir):
10231023
self.assertEqual(r.working_dir,repo_dir)
10241024
finally:
10251025
os.environ=oldenv
1026+
1027+
@with_rw_directory
1028+
deftest_rebasing(self,rw_dir):
1029+
r=Repo.init(rw_dir)
1030+
fp=osp.join(rw_dir,'hello.txt')
1031+
r.git.commit("--allow-empty",message="init",)
1032+
withopen(fp,'w')asfs:
1033+
fs.write("hello world")
1034+
r.git.add(Git.polish_url(fp))
1035+
r.git.commit(message="English")
1036+
self.assertEqual(r.currently_rebasing_on(),None)
1037+
r.git.checkout("HEAD^1")
1038+
withopen(fp,'w')asfs:
1039+
fs.write("Hola Mundo")
1040+
r.git.add(Git.polish_url(fp))
1041+
r.git.commit(message="Spanish")
1042+
commitSpanish=r.commit()
1043+
try:
1044+
r.git.rebase("master")
1045+
exceptGitCommandError:
1046+
pass
1047+
self.assertEqual(r.currently_rebasing_on(),commitSpanish)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp