Пример #1
0
 def test_read2 (self) : # testing where query is not found in input
     r = StringIO.StringIO("<red><green></green></red><yellow></yellow>")
     o = []
     i = read_XML(r, o)
     self.assertTrue (type(i) == list)
     self.assertTrue (type(j) == Element for j in i)
Пример #2
0
 def test_read3 (self) : # testing with new lines case
     r = StringIO.StringIO("<Team>\n<ACRush></ACRush>\n<Jelly></Jelly>\n<Cooly></Cooly>\n</Team><Team>\n<Cooly></Cooly>\n</Team>\n\n")
     o = []
     i = read_XML(r, o)
     self.assertTrue (type(i) == list)
     self.assertTrue (type(j) == Element for j in i)
Пример #3
0
 def test_read (self) :
     r = StringIO.StringIO("<Team><ACRush></ACRush><Jelly></Jelly><Cooly></Cooly></Team><Team><Cooly></Cooly></Team>")
     o = []
     i = read_XML(r, o)
     self.assertTrue (type(i) == list)
     self.assertTrue (type(j) == Element for j in i)