예제 #1
0
 def test_seq2str(self):
     for seq, expected in [((), ''), ([], ''), (set(), ''),
                           (['One'], "'One'"),
                           (['1', '2'], "'1' and '2'"),
                           (['a', 'b', 'c', 'd'], "'a', 'b', 'c' and 'd'")]:
         assert_equals(seq2str(seq), expected)
예제 #2
0
 def _verify(self, input, expected, **config):
     assert_equal(seq2str(input, **config), expected)
예제 #3
0
 def test_seq2str(self):
     for seq, expected in [((), ''), ([], ''), (set(), ''),
                           (['One'], "'One'"),
                           (['1', '2'], "'1' and '2'"),
                           (['a', 'b', 'c', 'd'], "'a', 'b', 'c' and 'd'")]:
         assert_equals(seq2str(seq), expected)
예제 #4
0
 def _verify(self, input, expected, **config):
     assert_equal(seq2str(input, **config), expected)