blob: 5e0103883e61dd25998682de55ace81bb42bf85b (
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 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])
|