Esempio n. 1
0
 def test_format_list_decrease(self):
     """
     tests that lists not containing 0 are decreased
     """
     originalList = [1, 3, 2]
     decreasedList = [0, 2, 1]
     self.assertEqual(decreasedList, Perm.format_list(originalList))
Esempio n. 2
0
 def test_format_list_decrease(self):
     """
     tests that lists not containing 0 are decreased
     """
     originalList = [1,3,2]
     decreasedList = [0,2,1]
     self.assertEqual(decreasedList, Perm.format_list(originalList))
Esempio n. 3
0
    def test_format_list_identity(self):
        """
        tests that any identity list become [0]
        """

        l = [0, 1, 2, 3, 4]
        self.assertEqual([0], Perm.format_list(l))
Esempio n. 4
0
 def test_format_list_identity(self):
     """
     tests that any identity list become [0]
     """
     
     l = [0,1,2,3,4]
     self.assertEqual([0], Perm.format_list(l))
Esempio n. 5
0
    def test_format_list_minimal(self):
        """
        tests that any extra at the end is left off
        """

        l = [1, 0, 2, 3, 4]
        l1 = [1, 0]
        self.assertEqual(l1, Perm.format_list(l))
Esempio n. 6
0
 def test_format_list_minimal(self):
     """
     tests that any extra at the end is left off
     """
     
     l = [1,0,2,3,4]
     l1 = [1,0]
     self.assertEqual(l1, Perm.format_list(l))
Esempio n. 7
0
 def test_format_list_normal(self):
     """
     test format a already formatted list does not change anything
     """
     l = [2, 1, 0]
     self.assertEqual(l, Perm.format_list(l))
Esempio n. 8
0
    def test_format_list_empty(self):
        """
        test that [] becomes [0]
        """

        self.assertEqual([0], Perm.format_list([]))
Esempio n. 9
0
 def test_format_list_normal(self):
     """
     test format a already formatted list does not change anything
     """
     l = [2,1,0]
     self.assertEqual(l, Perm.format_list(l))
Esempio n. 10
0
 def test_format_list_empty(self):
     """
     test that [] becomes [0]
     """
     
     self.assertEqual([0], Perm.format_list([]))