Skip to content

Commit a99953c

Browse files
committed
Merge branch 'tests'
2 parents 24d4926 + 67260a3 commit a99953c

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" not in git.call_args[1])
107107

108+
def test_it_accepts_environment_variables(self):
109+
filename = fixture_path("ls_tree_empty")
110+
with open(filename, 'r') as fh:
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
def test_persistent_cat_file_command(self):
109124
# read header only
110125
import subprocess as sp

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy