Example #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))
Example #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))
Example #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))
Example #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))
Example #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))
Example #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))
Example #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))
Example #8
0
    def test_format_list_empty(self):
        """
        test that [] becomes [0]
        """

        self.assertEqual([0], Perm.format_list([]))
Example #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))
Example #10
0
 def test_format_list_empty(self):
     """
     test that [] becomes [0]
     """
     
     self.assertEqual([0], Perm.format_list([]))