summaryrefslogtreecommitdiff
path: root/tests/test_display.py
blob: c61c262440b83bf395b7dbd32e4d5dd045c0f825 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import unittest

import pygame

from sliceitoff.display import Display

class TestDisplay(unittest.TestCase):
    def test_can_create(self):
        d = Display()
        self.assertNotEqual(d, None)

    def test_can_update(self):
        d = Display()
        surf = pygame.Surface((300,300))
        sprite = pygame.sprite.Sprite()
        sprite.image = surf
        sprite.rect = pygame.Rect((0,0),(300,300))
        group = pygame.sprite.Group()
        group.add(sprite)
        d.update([group])