예제 #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']