Skip to content

Commit

Permalink
Remove .stop() from tests as it saves RAM, while __del__ does not. Th…
Browse files Browse the repository at this point in the history
…is introduces race-conditions.
  • Loading branch information
Baekalfen committed Dec 11, 2024
1 parent 8c4072e commit 086490d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
3 changes: 0 additions & 3 deletions tests/test_game_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -75,5 +74,3 @@ def test_game_wrapper_mapping(default_rom):
dtype=np.uint32,
)
)

pyboy.stop()
3 changes: 0 additions & 3 deletions tests/test_game_wrapper_mario.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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):
Expand All @@ -51,4 +49,3 @@ def test_mario_game_over(supermarioland_rom):
pyboy.tick(1, False)
if mario.game_over():
break
pyboy.stop()

0 comments on commit 086490d

Please sign in to comment.