예제 #1
0
    def test_clear(self):
        block = Block(0, 0, Color.RED)
        self.assertEqual(block.color, Color.RED)
        self.assertFalse(block.is_clear())

        block.clear()
        self.assertEqual(block.color, Color.CLEAR)
        self.assertTrue(block.is_clear())
예제 #2
0
파일: test_block.py 프로젝트: m110/drpython
    def test_clear(self):
        block = Block(0, 0, Color.RED)
        self.assertEqual(block.color, Color.RED)
        self.assertFalse(block.is_clear())

        block.clear()
        self.assertEqual(block.color, Color.CLEAR)
        self.assertTrue(block.is_clear())
예제 #3
0
    def test_init(self):
        block = Block(1, 2)

        self.assertEqual(block.color, Color.CLEAR)
        self.assertEqual(block.x, 1)
        self.assertEqual(block.y, 2)
        self.assertTrue(block.is_clear())

        block = Block(0, 0, Color.RED)
        self.assertEqual(block.color, Color.RED)
        self.assertFalse(block.is_clear())
예제 #4
0
파일: test_block.py 프로젝트: m110/drpython
    def test_init(self):
        block = Block(1, 2)

        self.assertEqual(block.color, Color.CLEAR)
        self.assertEqual(block.x, 1)
        self.assertEqual(block.y, 2)
        self.assertTrue(block.is_clear())

        block = Block(0, 0, Color.RED)
        self.assertEqual(block.color, Color.RED)
        self.assertFalse(block.is_clear())