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

Commitfc02230

Browse files
committed
Report encoding error in test_add_unicode as error
This makes the test explicitly error out, rather than skipping, ifit appears the environment doesn't support encoding Unicodefilenames. Platforms these days should be capable of that, andreporting it as an error lessens the risk of missing a bug in thetest code (that method or a fixture) if one is ever introduced.Erroring out will also make it easier to see the details in thechained UnicodeDecodeError exception.This does not affect the behavior of GitPython itself. It onlychanges how a test reports an unusual condition that keeps the test\from being usefully run.
1 parentc6a586a commitfc02230

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎test/test_base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
importos
88
importsys
99
importtempfile
10-
fromunittestimportSkipTest,skipIf
10+
fromunittestimportskipIf
1111

1212
fromgitimportRepo
1313
fromgit.objectsimportBlob,Tree,Commit,TagObject
@@ -126,7 +126,7 @@ def test_add_unicode(self, rw_repo):
126126
try:
127127
file_path.encode(sys.getfilesystemencoding())
128128
exceptUnicodeEncodeErrorase:
129-
raiseSkipTest("Environment doesn't support unicode filenames")frome
129+
raiseRuntimeError("Environment doesn't support unicode filenames")frome
130130

131131
withopen(file_path,"wb")asfp:
132132
fp.write(b"something")

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp