docstr: Ensure SAX2DOM can parse from a stream.
docstr_tok: ["Ensure","SAX2DOM","can","parse","from","a","stream","."]
code: def test_basic(self):
      """Ensure SAX2DOM can parse from a stream."""
      with io.StringIO(SMALL_SAMPLE) as fin:
          sd = SAX2DOMTestHelper(
              fin, xml.sax.make_parser(), len(SMALL_SAMPLE)
          )
          for evt, node in sd:
              if (
                  evt == pulldom.START_ELEMENT
                  and node.tagName == "html"
              ):
                  break
          # Because the buffer is the same length as the XML, all the
          # nodes should have been parsed and added:
          self.assertGreater(len(node.childNodes), 0)
  
imports: import io
  import unittest
  import xml.sax
  from xml.sax.xmlreader import AttributesImpl
  from xml.sax.handler import feature_external_ges
  from xml.dom import pulldom
  from test.support import findfile
label_desc: Use image node_id 2 for calling the SAX2DOMTestCase obj's underlying member method code with example usage: obj.test_basic() without return types