From 7d49273897bd317323e0a3bbbc01b76e83370f0c Mon Sep 17 00:00:00 2001 From: David Aguilar Date: Thu, 29 May 2008 02:17:13 -0700 Subject: tests: add a test for the new with_stderr mechanism This test ensures that stderr is merged into stdout when git.foo( with_stderr=True ) is called. Signed-off-by: David Aguilar --- test/git/test_git.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'test/git/test_git.py') diff --git a/test/git/test_git.py b/test/git/test_git.py index 47066941..9984e4e0 100644 --- a/test/git/test_git.py +++ b/test/git/test_git.py @@ -44,3 +44,8 @@ class TestGit(object): except errors.GitCommandError, e: error_raised = True assert_equal( True, error_raised ) + + def test_it_returns_stderr_in_output(self): + # Note: no trailiing newline + assert_equal( "git: 'this-does-not-exist' is not a git-command. See 'git --help'.", + self.git.this_does_not_exist(with_stderr=True) ) -- cgit v1.2.1