summaryrefslogtreecommitdiff
path: root/git/test/test_git.py
diff options
context:
space:
mode:
Diffstat (limited to 'git/test/test_git.py')
-rw-r--r--git/test/test_git.py26
1 files changed, 12 insertions, 14 deletions
diff --git a/git/test/test_git.py b/git/test/test_git.py
index f7442257..b1ffa080 100644
--- a/git/test/test_git.py
+++ b/git/test/test_git.py
@@ -207,17 +207,15 @@ class TestGit(TestBase):
# end if select.poll exists
def test_dispatch_lines(self):
- for path, line_count in ((fixture_path('issue-301_stderr'), 5002),
- (fixture_path('issue-301_FETCH_HEAD'), 5001)):
- count = [0]
- def counter(line):
- count[0] += 1
-
- fd = os.open(path, os.O_RDONLY)
- buf_list = [b'']
- lines_parsed = _deplete_buffer(fd, counter, buf_list)
- os.close(fd)
-
- assert lines_parsed == line_count
- assert count[0] == line_count
- # end for each file to read
+ line_count = 5002
+ count = [0]
+ def counter(line):
+ count[0] += 1
+
+ fd = os.open(fixture_path('issue-301_stderr'), os.O_RDONLY)
+ buf_list = [b'']
+ lines_parsed = _deplete_buffer(fd, counter, buf_list)
+ os.close(fd)
+
+ assert lines_parsed == line_count
+ assert count[0] == line_count