From 12b32450c210cec1fdd8b2c19d564776e8054aa3 Mon Sep 17 00:00:00 2001 From: David Aguilar Date: Sat, 31 May 2008 15:33:47 -0700 Subject: tests: ensure cmd.execute can handle large output This test case ensures that cmd.execute can always handle large command outputs. This test does so by reading a 700k file into memory. Signed-off-by: David Aguilar --- test/git/test_git.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test/git/test_git.py') diff --git a/test/git/test_git.py b/test/git/test_git.py index 2b2464b0..d11bd661 100644 --- a/test/git/test_git.py +++ b/test/git/test_git.py @@ -51,3 +51,7 @@ class TestGit(object): 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( len(output) > 4096 * 1024 ) # at least 4k -- cgit v1.2.1