示例#1
0
 def test_None(self):
     assert aslist(None) == []
示例#2
0
 def test_nonstring(self):
     assert aslist(55) == [55]
示例#3
0
 def test_already_list(self):
     assert aslist([55]) == [55]
示例#4
0
 def test_fine(self):
     assert aslist('first,   second, third',
                   ',') == ['first', 'second', 'third']
     assert aslist('first second     third') == ['first', 'second', 'third']
     assert aslist('first,   second, third', ',',
                   False) == ['first', '   second', ' third']
示例#5
0
 def test_None(self):
     assert aslist(None) == []
示例#6
0
 def test_already_list(self):
     assert aslist([55]) == [55]
示例#7
0
 def test_nonstring(self):
     assert aslist(55) == [55]
示例#8
0
 def test_fine(self):
     assert aslist('first,   second, third', ',') == ['first', 'second', 'third']
     assert aslist('first second     third') == ['first', 'second', 'third']
     assert aslist('first,   second, third', ',', False) == ['first', '   second', ' third']