From 8a511751f6a4b0c6f789695d000bf1f6074ce15d Mon Sep 17 00:00:00 2001 From: Leonard Richardson Date: Sat, 24 Mar 2012 11:00:42 -0400 Subject: Pass data into XMLParser.feed() in chunks. [bug=963880] --- bs4/testing.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'bs4/testing.py') diff --git a/bs4/testing.py b/bs4/testing.py index 1b73160..e9c505c 100644 --- a/bs4/testing.py +++ b/bs4/testing.py @@ -410,6 +410,14 @@ class XMLTreeBuilderSmokeTest(object): soup = self.soup(markup) self.assertEqual(soup.encode("utf-8"), markup) + def test_large_xml_document(self): + """A large XML document should come out the same as it went in.""" + markup = (b'\n' + + b'0' * (2**12) + + b'') + soup = self.soup(markup) + self.assertEqual(soup.encode("utf-8"), markup) + def test_tags_are_empty_element_if_and_only_if_they_are_empty(self): self.assertSoupEquals("

", "

") -- cgit v1.2.3