def test_read_4 (self) :
     #Added White Space
     r = io.StringIO("<a><b>  </b>   </a><c></c>")   
     b = xmlRead(r)
     self.assertTrue(b == "<xml><a><b>  </b>   </a><c></c></xml>")
    def test_read_2 (self) :
	#added content to tag
        r = io.StringIO("<a>dog</a>")
        b = xmlRead(r)
        self.assertTrue(b == "<xml><a>dog</a></xml>")
    def test_read_3 (self) :
	#Added tab delimiter
        r = io.StringIO("<a><b>\t<c></c></b>\t</a>")
        b = xmlRead(r)
        self.assertTrue(b == "<xml><a><b>\t<c></c></b>\t</a></xml>")
示例#4
0
 def test_read3(self):
     r = io.StringIO("<A>\n<B>\n<C></C>\n</B>\n</A>")
     b = xmlRead(r)
     self.assertTrue(b == "<A><B><C></C></B></A>")
    def test_read_1 (self) :
	#added new line delimiter
        r = io.StringIO("<THU>\n<team>\n</team>\n</THU>")
        b = xmlRead(r)
        self.assertTrue(b == "<xml><THU>\n<team>\n</team>\n</THU></xml>")
示例#6
0
 def test_xmlRead_text (self) :
     r = StringIO.StringIO(xml_text)
     b = xmlRead(r)
     self.assert_(b == "<XML>" + xml_text + "</XML>")
示例#7
0
 def test_read2(self):
     r = io.StringIO("<A><B><B></B></B></A>")
     b = xmlRead(r)
     self.assertTrue(b == "<A><B><B></B></B></A>")
示例#8
0
 def test_xmlRead_empty (self) :
     r = StringIO.StringIO("")
     b = xmlRead(r)
     # the below may be bad because we allow blank lines in input
     self.assert_(b == "<XML></XML>")
示例#9
0
 def test_xmlRead_whitespace (self) :
     r = StringIO.StringIO(xml_whitespace)
     b = xmlRead(r)
     self.assert_(b == "<XML>" + xml_whitespace + "</XML>")
示例#10
0
 def test_xmlRead (self) :
     r = StringIO.StringIO(xml1)
     b = xmlRead(r)
     self.assert_(b == "<XML>" + xml1 + "</XML>")
示例#11
0
 def test_xmlRead_text(self):
     r = StringIO.StringIO(xml_text)
     b = xmlRead(r)
     self.assert_(b == "<XML>" + xml_text + "</XML>")
示例#12
0
 def test_xmlRead_whitespace(self):
     r = StringIO.StringIO(xml_whitespace)
     b = xmlRead(r)
     self.assert_(b == "<XML>" + xml_whitespace + "</XML>")
示例#13
0
 def test_xmlRead_empty(self):
     r = StringIO.StringIO("")
     b = xmlRead(r)
     # the below may be bad because we allow blank lines in input
     self.assert_(b == "<XML></XML>")
示例#14
0
 def test_xmlRead(self):
     r = StringIO.StringIO(xml1)
     b = xmlRead(r)
     self.assert_(b == "<XML>" + xml1 + "</XML>")