aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/doctests/test_GitRepository.py
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2017-01-06 12:18:53 +0100
committerGuido Günther <agx@sigxcpu.org>2017-01-06 12:44:34 +0100
commitede603e73a49eca2af2460c0a300a5cfdf83a785 (patch)
treef3bfa6b218be2f2a18530ef962e9d3476bd23d53 /tests/doctests/test_GitRepository.py
parent30e49dd1e332ce005b0d3cd977186753bf2c3b06 (diff)
GitRepository: properly use pipe on empty strings
So far we've been avoiding a pipe for input on empty strings. This would make commands as 'git mktree' hang forever waiting for standard input. So use a proper pipe on '' and skip it only for None. Closes: #850319
Diffstat (limited to 'tests/doctests/test_GitRepository.py')
-rw-r--r--tests/doctests/test_GitRepository.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/doctests/test_GitRepository.py b/tests/doctests/test_GitRepository.py
index 5bc1709c..348c5602 100644
--- a/tests/doctests/test_GitRepository.py
+++ b/tests/doctests/test_GitRepository.py
@@ -914,6 +914,8 @@ def test_make_tree():
'745951810c9e22fcc6de9b23f05efd6ab5512123'
>>> repo.list_tree(newtree, recurse=False, paths='testfile')
[['100644', 'blob', '19af7398c894bc5e86e17259317e4db519e9241f', 'testfile']]
+ >>> repo.make_tree([])
+ '4b825dc642cb6eb9a060e54bf8d69288fbee4904'
"""