# jogai - Python Game Library # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # Ramón Palleiro Rodríguez # Zero! Factorial Studio # info@zero.gal import pytest from pygame.display import get_init from jogai import videogame as vg from jogai.groups import Group, SquareGroup @vg.prepare('test') def test_code(): ... @pytest.fixture(scope='class') def videogame_test(): vg.init() vg.load_environment('test') yield vg @pytest.fixture def scene_filename_test(): return 'scene.png' @pytest.fixture def character_filename_test(): return 'protagonist.png' @pytest.fixture(scope='class') def character_test(): return protagonist @pytest.fixture def character_name_test(): return 'protagonist' @pytest.fixture def secondary_character_test(): return secondary @pytest.fixture def group_name_test(): return 'protagonists' @pytest.fixture def group_character_test(character_test): return character_test @pytest.fixture def simple_group_test(group_name_test, group_character_test): return Group(group_name_test, [group_character_test]) @pytest.fixture def square_group_test(group_name_test, group_character_test): return SquareGroup(group_name_test, group_character_test, 2) @pytest.fixture def random_group_test(): return bricks