Пример #1
0
    def test_validate_cycle_nonpositive(self):
        """
        test validate cycle with non-positive cycle elements
        """

        cycle = (1, 2, -1)
        self.assertFalse(Perm.validate_cycle(cycle))
Пример #2
0
    def test_validate_cycle_repeat(self):
        """
        test validate cycle with a repeated element  of the cycle
        """

        cycle = (1, 2, 1)
        self.assertFalse(Perm.validate_cycle(cycle))
Пример #3
0
    def test_validate_cycle_non_int(self):
        """
        test validate_cycle with non integer cycle
        """

        cycle = ('f', 2)
        self.assertFalse(Perm.validate_cycle(cycle))
Пример #4
0
 def test_validate_cycle_nonpositive(self):
     """
     test validate cycle with non-positive cycle elements
     """
     
     cycle = (1, 2, -1)
     self.assertFalse(Perm.validate_cycle(cycle))
Пример #5
0
 def test_validate_cycle_repeat(self):
     """
     test validate cycle with a repeated element  of the cycle
     """
     
     cycle = (1, 2, 1)
     self.assertFalse(Perm.validate_cycle(cycle))
Пример #6
0
 def test_validate_cycle_non_int(self):
     """
     test validate_cycle with non integer cycle
     """
     
     cycle = ('f', 2)
     self.assertFalse(Perm.validate_cycle(cycle))