summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_sax.py9
-rw-r--r--Lib/xml/sax/xmlreader.py2
2 files changed, 4 insertions, 7 deletions
diff --git a/Lib/test/test_sax.py b/Lib/test/test_sax.py
index 5f1a48e..a45d1f3 100644
--- a/Lib/test/test_sax.py
+++ b/Lib/test/test_sax.py
@@ -446,8 +446,7 @@ class ExpatReaderTest(XmlTestBase):
# ===== InputSource support
- def XXXtest_expat_inpsource_filename(self):
- # FIXME: test blocks indefinitely
+ def test_expat_inpsource_filename(self):
parser = create_parser()
result = StringIO()
xmlgen = XMLGenerator(result)
@@ -457,8 +456,7 @@ class ExpatReaderTest(XmlTestBase):
self.assertEquals(result.getvalue(), xml_test_out)
- def XXXtest_expat_inpsource_sysid(self):
- # FIXME: test blocks indefinitely
+ def test_expat_inpsource_sysid(self):
parser = create_parser()
result = StringIO()
xmlgen = XMLGenerator(result)
@@ -531,8 +529,7 @@ class ExpatReaderTest(XmlTestBase):
self.assertEquals(parser.getPublicId(), None)
self.assertEquals(parser.getLineNumber(), 1)
- def XXXtest_expat_locator_withinfo(self):
- # FIXME: test blocks indefinitely
+ def test_expat_locator_withinfo(self):
result = StringIO()
xmlgen = XMLGenerator(result)
parser = create_parser()
diff --git a/Lib/xml/sax/xmlreader.py b/Lib/xml/sax/xmlreader.py
index 6264ee3..5ce30b0 100644
--- a/Lib/xml/sax/xmlreader.py
+++ b/Lib/xml/sax/xmlreader.py
@@ -119,7 +119,7 @@ class IncrementalParser(XMLReader):
self.prepareParser(source)
file = source.getByteStream()
buffer = file.read(self._bufsize)
- while buffer != "":
+ while buffer:
self.feed(buffer)
buffer = file.read(self._bufsize)
self.close()