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

Commitc8b8379

Browse files
committed
fix(test_index): fix encoding
I really never want to touch python again, and never deal withpy2/3 unicode handling anymore.By now, it seems pretty much anything is better.Is python to be blamed for it entirely ?Probably not, but there are better alternatives.Nim ? Rust ? Ruby ?Totally
1 parenta8f7e37 commitc8b8379

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎git/test/test_index.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -787,8 +787,8 @@ def test_index_bare_add(self, rw_bare_repo):
787787
deftest_add_utf8P_path(self,rw_dir):
788788
# NOTE: fp is not a Unicode object in python 2 (which is the source of the problem)
789789
fp=os.path.join(rw_dir,'ø.txt')
790-
withopen(fp,'w')asfs:
791-
fs.write('content of ø')
790+
withopen(fp,'wb')asfs:
791+
fs.write(u'content of ø'.encode('utf-8'))
792792

793793
r=Repo.init(rw_dir)
794794
r.index.add([fp])

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp