예제 #1
0
    def test_set_falling(self):
        block = Block(0, 0)
        self.assertFalse(block.is_falling())

        block.set_falling(True)
        self.assertTrue(block.is_falling())

        block.set_falling(False)
        self.assertFalse(block.is_falling())
예제 #2
0
파일: test_block.py 프로젝트: m110/drpython
    def test_set_falling(self):
        block = Block(0, 0)
        self.assertFalse(block.is_falling())

        block.set_falling(True)
        self.assertTrue(block.is_falling())

        block.set_falling(False)
        self.assertFalse(block.is_falling())
예제 #3
0
    def test_set_falling_raises_exception_on_double_set(self):
        block = Block(0, 0)

        with self.assertRaises(InvalidOperation):
            block.set_falling(False)

        block.set_falling(True)
        with self.assertRaises(InvalidOperation):
            block.set_falling(True)
예제 #4
0
파일: test_block.py 프로젝트: m110/drpython
    def test_set_falling_raises_exception_on_double_set(self):
        block = Block(0, 0)

        with self.assertRaises(InvalidOperation):
            block.set_falling(False)

        block.set_falling(True)
        with self.assertRaises(InvalidOperation):
            block.set_falling(True)