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