diff options
Diffstat (limited to 'test/git/test_git.py')
-rw-r--r-- | test/git/test_git.py | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/test/git/test_git.py b/test/git/test_git.py index e452e68b..0c074ec3 100644 --- a/test/git/test_git.py +++ b/test/git/test_git.py @@ -14,6 +14,11 @@ class TestGit(object): assert_true(git.called) # assert_equal(git.call_args, ((("%s version " % self.git_bin_base),), {})) + @raises(GitCommandError) + def test_it_raises_errors(self): + self.git.this_does_not_exist() + + def test_it_transforms_kwargs_into_git_command_arguments(self): assert_equal(["-s"], self.git.transform_kwargs(**{'s': True})) assert_equal(["-s5"], self.git.transform_kwargs(**{'s': 5})) @@ -33,25 +38,6 @@ class TestGit(object): self.git.hash_object(istream=fh, stdin=True)) fh.close() - def test_it_returns_status_and_ignores_stderr(self): - assert_equal((1, ""), self.git.this_does_not_exist(with_status=True)) - - @raises(GitCommandError) - def test_it_raises_errors(self): - self.git.this_does_not_exist(with_exceptions=True) - - def test_it_returns_stderr_in_output(self): - # Note: no trailiing newline - assert_match(r"^git: 'this-does-not-exist' is not a git-command", - self.git.this_does_not_exist(with_stderr=True)) - - def test_it_does_not_strip_output_when_using_with_raw_output(self): - # Note: trailing newline - assert_match(r"^git: 'this-does-not-exist' is not a git-command" \ - r"(\. See 'git --help'\.)?" + os.linesep, - self.git.this_does_not_exist(with_stderr=True, - with_raw_output=True)) - def test_it_handles_large_input(self): output = self.git.execute(["cat", "/bin/bash"]) assert_true(len(output) > 4096) # at least 4k |