예제 #1
0
    def testShouldFailSinceMethodIsIllegal(self):
        cube = Cube()
        numberOfRotations = '1'
        cube.scramble(numberOfRotations, 'test')

        self.assertEquals('unknown function for scramble', cube.error)
예제 #2
0
    def testShouldFailSinceNIsIllegal3(self):
        cube = Cube()
        numberOfRotations = 'a'
        cube.scramble(numberOfRotations)

        self.assertEquals('n must be an integer between 0 to 99', cube.error)
예제 #3
0
    def testShouldTestScrambleNotBeing100Two(self):
        cube = Cube()
        numberOfRotations = '8'
        cube.scramble(numberOfRotations)

        self.assertNotEquals(cube.status, 'scrambled 100')
예제 #4
0
    def testShouldTestTransitionFidelity(self):
        cube = Cube()
        numberOfRotations = '1'
        cube.scramble(numberOfRotations, 'transition')

        self.assertEquals(cube.status, 'scrambled 67')
예제 #5
0
    def testShouldTestPicking1Rotations(self):
        cube = Cube()
        numberOfRotations = '1'
        cube.scramble(numberOfRotations)

        self.assertEquals(len(cube.rotations), int(numberOfRotations))