Exemple #1
0
 def test_four_items(self):
     items = ['foo', 'bar', 'baz', 'qux']
     output = lifecycle._humanize_list(items)
     self.assertEqual(output, "'bar', 'baz', 'foo', and 'qux'")
Exemple #2
0
 def test_one_item(self):
     items = ['foo']
     output = lifecycle._humanize_list(items)
     self.assertEqual(output, "'foo'")
Exemple #3
0
 def test_two_items(self):
     items = ['foo', 'bar']
     output = lifecycle._humanize_list(items)
     self.assertEqual(output, "'bar' and 'foo'",
                      "Expected 'bar' before 'foo' due to sorting")
Exemple #4
0
 def test_no_items(self):
     items = []
     output = lifecycle._humanize_list(items)
     self.assertEqual(output, '')
Exemple #5
0
 def test_four_items(self):
     items = ['foo', 'bar', 'baz', 'qux']
     output = lifecycle._humanize_list(items)
     self.assertEqual(output, "'bar', 'baz', 'foo', and 'qux'")
Exemple #6
0
 def test_two_items(self):
     items = ['foo', 'bar']
     output = lifecycle._humanize_list(items)
     self.assertEqual(output, "'bar' and 'foo'",
                      "Expected 'bar' before 'foo' due to sorting")
Exemple #7
0
 def test_one_item(self):
     items = ['foo']
     output = lifecycle._humanize_list(items)
     self.assertEqual(output, "'foo'")
Exemple #8
0
 def test_no_items(self):
     items = []
     output = lifecycle._humanize_list(items)
     self.assertEqual(output, '')