| Index: tests/git_common_test.py
|
| diff --git a/tests/git_common_test.py b/tests/git_common_test.py
|
| index 5ba00b25791c52246f78fdf0751ffcf2c3c1c1d7..dc40c043e5e9e9670e9d076129190e53b23a0e86 100755
|
| --- a/tests/git_common_test.py
|
| +++ b/tests/git_common_test.py
|
| @@ -221,6 +221,24 @@ class GitReadOnlyFunctionsTest(git_test_utils.GitRepoReadOnlyTestBase,
|
|
|
| self.repo.run(testfn)
|
|
|
| + def testStreamWithRetcode(self):
|
| + items = set(self.repo.commit_map.itervalues())
|
| +
|
| + def testfn():
|
| + with self.gc.run_stream_with_retcode('log', '--format=%H') as stdout:
|
| + for line in stdout.xreadlines():
|
| + line = line.strip()
|
| + self.assertIn(line, items)
|
| + items.remove(line)
|
| +
|
| + self.repo.run(testfn)
|
| +
|
| + def testStreamWithRetcodeException(self):
|
| + import subprocess2
|
| + with self.assertRaises(subprocess2.CalledProcessError):
|
| + with self.gc.run_stream_with_retcode('checkout', 'unknown-branch'):
|
| + pass
|
| +
|
| def testCurrentBranch(self):
|
| def cur_branch_out_of_git():
|
| os.chdir('..')
|
|
|