Beispiel #1
0
 def test_one_element(self):
     self.assertEqual(list_to_string(['apples']), 'apples')
Beispiel #2
0
 def test_empty(self):
     self.assertEqual(list_to_string([]), '')
Beispiel #3
0
 def test_none_arguments(self):
     self.assertEqual(list_to_string([None, None]), 'None and None')
Beispiel #4
0
 def test_integers(self):
     self.assertEqual(list_to_string([1, 3]), '1 and 3')
Beispiel #5
0
 def test_typical(self):
     self.assertEqual(list_to_string(['apples', 'bananas', 'tofu', 'cats']),
                      'apples, bananas, tofu and cats')
Beispiel #6
0
 def test_two_elements(self):
     self.assertEqual(list_to_string(['apples', 'bananas']),
                      'apples and bananas')