import pygame as pg import pytest from ship import Ship def test_ship_constructor(): scr_rect = pg.Rect(0,0,100,100) a_ship = Ship((10+Ship.SIZE/2, 20+Ship.SIZE/2), scr_rect) assert a_ship.rect.centerx == scr_rect.centerx assert a_ship.rect.centery == scr_rect.centery assert a_ship.map_rect.left == 10+1 assert a_ship.map_rect.top == 20+1