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