diff options
Diffstat (limited to 'src/zope/tal/tests')
-rw-r--r-- | src/zope/tal/tests/test_xmlparser.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/zope/tal/tests/test_xmlparser.py b/src/zope/tal/tests/test_xmlparser.py index 530a938..0c7344c 100644 --- a/src/zope/tal/tests/test_xmlparser.py +++ b/src/zope/tal/tests/test_xmlparser.py @@ -86,8 +86,12 @@ class SegmentedFile(object): def __init__(self, parts): self.parts = list(parts) - def read(self, bytes): - if self.parts: + def read(self, nbytes=None): + if nbytes is None: + # PyPy's expat wants to read everything in one go + s = b''.join(self.parts) + del self.parts[:] + elif self.parts: s = self.parts.pop(0) else: s = b'' |