Esempio n. 1
0
    def test_zero_mask_clear(self):
        sizes = ((100, 0), (0, 100), (0, 0))

        for size in sizes:
            mask = pygame.mask.Mask(size)
            mask.clear()
            self.assertEqual(mask.count(), 0)
Esempio n. 2
0
    def test_clear(self):
        """Ensure a mask can be cleared."""
        expected_count = 0
        mask = pygame.mask.Mask((13, 27), fill=True)

        mask.clear()

        self.assertEqual(mask.count(), expected_count)