Esempio n. 1
0
 def test_xlist_join_diffstring(self):
     xl = XList(['one', 'two', 'three'], {'first_attr': 1})
     mes = xl.join(',')
     self.assertEqual(mes, 'one,two,three')
Esempio n. 2
0
 def test_xlist_join_typeerror(self):
     xl = XList(['one', 'two', 'three'], {'first_attr': 1})
     with self.assertRaises(
             AttributeError):  # incorrect type raises attribute error
         mes = xl.join(1)
Esempio n. 3
0
 def test_xlist_join(self):
     xl = XList(['one', 'two', 'three'], {'first_attr': 1})
     mes = xl.join(" ")
     self.assertEqual(mes, 'one two three')
Esempio n. 4
0
 def test_xlist_join_diffstring(self):
     xl = XList(['one', 'two', 'three'], {'first_attr': 1})
     mes = xl.join(',')
     self.assertEqual(mes, 'one,two,three')
Esempio n. 5
0
 def test_xlist_join_typeerror(self):
     xl = XList(['one', 'two', 'three'], {'first_attr': 1})
     with self.assertRaises(AttributeError): # incorrect type raises attribute error
         mes = xl.join(1)
Esempio n. 6
0
 def test_xlist_join(self):
     xl = XList(['one', 'two', 'three'], {'first_attr': 1})
     mes = xl.join(" ")
     self.assertEqual(mes, 'one two three')