From 086490d42bda2221147f800ec148cdd738903214 Mon Sep 17 00:00:00 2001 From: Mads Ynddal Date: Wed, 11 Dec 2024 19:50:49 +0100 Subject: [PATCH] Remove .stop() from tests as it saves RAM, while __del__ does not. This introduces race-conditions. --- tests/test_game_wrapper.py | 3 --- tests/test_game_wrapper_mario.py | 3 --- 2 files changed, 6 deletions(-) diff --git a/tests/test_game_wrapper.py b/tests/test_game_wrapper.py index ed3c4c378..0205b80b6 100644 --- a/tests/test_game_wrapper.py +++ b/tests/test_game_wrapper.py @@ -15,7 +15,6 @@ def test_game_wrapper_basics(default_rom): generic_wrapper = pyboy.game_wrapper assert generic_wrapper is not None pyboy.game_area() - pyboy.stop() def test_game_wrapper_mapping(default_rom): @@ -75,5 +74,3 @@ def test_game_wrapper_mapping(default_rom): dtype=np.uint32, ) ) - - pyboy.stop() diff --git a/tests/test_game_wrapper_mario.py b/tests/test_game_wrapper_mario.py index 9cb771afe..fbbc32bea 100644 --- a/tests/test_game_wrapper_mario.py +++ b/tests/test_game_wrapper_mario.py @@ -18,7 +18,6 @@ def test_mario_basics(supermarioland_rom): assert mario.lives_left == 2 assert mario.time_left == 400 assert mario.world == (1, 1) - pyboy.stop() def test_mario_advanced(supermarioland_rom): @@ -36,7 +35,6 @@ def test_mario_advanced(supermarioland_rom): assert mario.lives_left == lives assert mario.time_left == 400 assert mario.world == (3, 2) - pyboy.stop() def test_mario_game_over(supermarioland_rom): @@ -51,4 +49,3 @@ def test_mario_game_over(supermarioland_rom): pyboy.tick(1, False) if mario.game_over(): break - pyboy.stop()