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

Commitdfb0a9c

Browse files
committed
Added specific test for roughly checking configuration paths.
For some reason, I didn't trust the existing one as it tests that codemore indirectly.Related togitpython-developers#160
1 parentacd8246 commitdfb0a9c

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

‎.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ cover/
1010
/doc/_build
1111
nbproject
1212
*.sublime-workspace
13-
13+
.DS_Store
1414
/*egg-info
1515
/.tox

‎git/repo/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ def _get_config_path(self, config_level):
354354
ifconfig_level=="system":
355355
return"/etc/gitconfig"
356356
elifconfig_level=="user":
357-
config_home=os.environ.get("XDG_CONFIG_HOME")orjoin(os.environ.get("HOME",'~'),".config")
357+
config_home=os.environ.get("XDG_CONFIG_HOME")oros.path.join(os.environ.get("HOME",'~'),".config")
358358
returnos.path.expanduser(join(config_home,"git","config"))
359359
elifconfig_level=="global":
360360
returnos.path.normpath(os.path.expanduser("~/.gitconfig"))

‎git/test/test_repo.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -365,6 +365,11 @@ def test_config_writer(self):
365365
pass
366366
# END for each config level
367367

368+
deftest_config_level_paths(self):
369+
forconfig_levelinself.rorepo.config_level:
370+
assertself.rorepo._get_config_path(config_level)
371+
# end for each config level
372+
368373
deftest_creation_deletion(self):
369374
# just a very quick test to assure it generally works. There are
370375
# specialized cases in the test_refs module

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp