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

Commit67260a3

Browse files
committed
test if it accepts environment variables in commands
1 parentcf8dc25 commit67260a3

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

‎git/test/fixtures/ls_tree_empty

Whitespace-only changes.

‎git/test/test_git.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,21 @@ def test_it_ignores_false_kwargs(self, git):
105105
self.git.version(pass_this_kwarg=False)
106106
assert_true("pass_this_kwarg"notingit.call_args[1])
107107

108+
deftest_it_accepts_environment_variables(self):
109+
filename=fixture_path("ls_tree_empty")
110+
withopen(filename,'r')asfh:
111+
tree=self.git.mktree(istream=fh)
112+
env= {
113+
'GIT_AUTHOR_NAME':'Author Name',
114+
'GIT_AUTHOR_EMAIL':'author@example.com',
115+
'GIT_AUTHOR_DATE':'1400000000+0000',
116+
'GIT_COMMITTER_NAME':'Committer Name',
117+
'GIT_COMMITTER_EMAIL':'committer@example.com',
118+
'GIT_COMMITTER_DATE':'1500000000+0000',
119+
}
120+
commit=self.git.commit_tree(tree,m='message',env=env)
121+
assert_equal(commit,'4cfd6b0314682d5a58f80be39850bad1640e9241')
122+
108123
deftest_persistent_cat_file_command(self):
109124
# read header only
110125
importsubprocessassp

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp