Exemple #1
0
 def test_length_non_empty_list(self):
     self.assertEqual(length([1, 2, 3, 4]), 4)
Exemple #2
0
 def test_empty_len(self):
     self.assertEqual(0, list_ops.length([]))
Exemple #3
0
 def test_length_empty_list(self):
     self.assertEqual(length([]), 0)
 def test_length_nonempty_list(self):
     self.assertEqual(list_ops.length([1, 2, 3, 4]), 4)
Exemple #5
0
 def test_pos_leng(self):
     self.assertEqual(10,
                      list_ops.length((-1, 2, -3, 4, -5, 6, -7, 8, -9, 10)))
 def test_length_empty_list(self):
     self.assertEqual(list_ops.length([]), 0)
Exemple #7
0
 def test_pos_leng(self):
     self.assertEqual(list_ops.length([-1, 2, -3, 4, -5, 6, -7, 8, -9, 10]),
                      10)
Exemple #8
0
 def test_empty_len(self):
     self.assertEqual(0, list_ops.length([]))
Exemple #9
0
 def test_pos_leng(self):
     self.assertEqual(10, list_ops.length((-1, 2, -3, 4, -5, 6, -7, 8, -9, 10)))
Exemple #10
0
 def test_pos_leng(self):
     self.assertEqual(
         list_ops.length([-1, 2, -3, 4, -5, 6, -7, 8, -9, 10]), 10)