summaryrefslogtreecommitdiff
path: root/git/test/test_git.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2015-07-03 12:40:57 +0200
committerSebastian Thiel <byronimo@gmail.com>2015-07-03 12:40:57 +0200
commit36dbe7e9b55a09c68ba179bcf2c3d3e1b7898ef3 (patch)
tree6e706b73cd302a30a6d0ba87cbfccf38e39fb968 /git/test/test_git.py
parent6d0f693184884ffac97908397b074e208c63742b (diff)
downloadgitpython-36dbe7e9b55a09c68ba179bcf2c3d3e1b7898ef3.tar.gz
test(git): remove unnecessary fixture
Test was adjusted as well to parse only a single file which simulates stderr output.
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