diff options
| author | Robert Collins <robertc@robertcollins.net> | 2009-03-18 20:33:42 +1100 |
|---|---|---|
| committer | Robert Collins <robertc@robertcollins.net> | 2009-03-18 20:33:42 +1100 |
| commit | ee70ef7909b72b4dd2231dbd3fdf188deebfd284 (patch) | |
| tree | 990f595f63c09d4849f20535c06bb310381c804d /python/subunit/__init__.py | |
| parent | f08ed224895e8d5452f2f99c27c31b848b648b23 (diff) | |
| download | subunit-git-ee70ef7909b72b4dd2231dbd3fdf188deebfd284.tar.gz | |
Fix python issue with ProtocolTestCase: file.readline() gets a line immediately, file.readlines(), when file is a pipe/socket, requires a full buffer and thus gives very large chunks of tests rather than small groups, making concurrent-test-mixing somewhat hard.
Diffstat (limited to 'python/subunit/__init__.py')
| -rw-r--r-- | python/subunit/__init__.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/python/subunit/__init__.py b/python/subunit/__init__.py index 9f7dd64..3402ae5 100644 --- a/python/subunit/__init__.py +++ b/python/subunit/__init__.py @@ -652,8 +652,10 @@ class ProtocolTestCase(object): if result is None: result = self.defaultTestResult() protocol = TestProtocolServer(result) - for line in self._stream: + line = self._stream.readline() + while line: protocol.lineReceived(line) + line = self._stream.readline() protocol.lostConnection() |
