Beispiel #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')
Beispiel #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)
Beispiel #3
0
 def test_xlist_join(self):
     xl = XList(['one', 'two', 'three'], {'first_attr': 1})
     mes = xl.join(" ")
     self.assertEqual(mes, 'one two three')
Beispiel #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')
Beispiel #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)
Beispiel #6
0
 def test_xlist_join(self):
     xl = XList(['one', 'two', 'three'], {'first_attr': 1})
     mes = xl.join(" ")
     self.assertEqual(mes, 'one two three')