예제 #1
0
 def test_write2 (self) :
   a = [3, 5, 7]
   s = "3\n3\n5\n7" 
   w = io.StringIO()
   xml_write(w, a)
   d = w.getvalue()
   self.assertTrue(d == s) 
예제 #2
0
 def test_write3 (self) :
   a = [2, 2, 55, 9, 20]
   s = "5\n2\n2\n55\n9\n20" 
   w = io.StringIO()
   xml_write(w, a)
   d = w.getvalue()
   self.assertTrue(d == s) 
예제 #3
0
 def test_write1 (self) :
   a = [2, 2, 7]
   s = "3\n2\n2\n7" 
   w = io.StringIO()
   xml_write(w, a)
   d = w.getvalue()
   self.assertTrue(d == s)