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

Commit1710626

Browse files
committed
Add tests with non-ascii characters
1 parent8434967 commit1710626

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

‎test/test_clone.py‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,13 @@ def test_clone_from_pathlike(self, rw_dir):
5252
original_repo=Repo.init(osp.join(rw_dir,"repo"))
5353
Repo.clone_from(PathLikeMock(original_repo.git_dir),PathLikeMock(os.path.join(rw_dir,"clone_pathlike")))
5454

55+
@with_rw_directory
56+
deftest_clone_from_pathlike_unicode_repr(self,rw_dir):
57+
original_repo=Repo.init(osp.join(rw_dir,"repo-áēñöưḩ̣"))
58+
Repo.clone_from(
59+
PathLikeMock(original_repo.git_dir),PathLikeMock(os.path.join(rw_dir,"clone_pathlike-áēñöưḩ̣"))
60+
)
61+
5562
@with_rw_directory
5663
deftest_clone_from_pathlib_withConfig(self,rw_dir):
5764
original_repo=Repo.init(osp.join(rw_dir,"repo"))

‎test/test_index.py‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1212,6 +1212,15 @@ def test_index_add_pathlike(self, rw_repo):
12121212

12131213
rw_repo.index.add(PathLikeMock(str(file)))
12141214

1215+
@with_rw_repo("HEAD")
1216+
deftest_index_add_pathlike_unicode(self,rw_repo):
1217+
git_dir=Path(rw_repo.git_dir)
1218+
1219+
file=git_dir/"file-áēñöưḩ̣.txt"
1220+
file.touch()
1221+
1222+
rw_repo.index.add(PathLikeMock(str(file)))
1223+
12151224
@with_rw_repo("HEAD")
12161225
deftest_index_add_non_normalized_path(self,rw_repo):
12171226
git_dir=Path(rw_repo.git_dir)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp