Skip to content

Commit

Permalink
Add vectroid to tests. Not booting
Browse files Browse the repository at this point in the history
  • Loading branch information
Baekalfen committed Dec 16, 2024
1 parent f934cc6 commit 314789e
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,19 @@ def whichboot_file():
return str(path)


# https://gitlab.com/BonsaiDen/vectroid.gb
@pytest.fixture(scope="session")
def vectroid_file():
path = extra_test_rom_dir / Path("vectroid.gb")
with FileLock(path.with_suffix(".lock")) as lock:
if not os.path.isfile(path):
print(url_open("https://pyboy.dk/mirror/LICENSE.vectroid.txt"))
vectroid_data = url_open("https://pyboy.dk/mirror/vectroid.gbc")
with open(path, "wb") as rom_file:
rom_file.write(vectroid_data)
return str(path)


@pytest.fixture(scope="session")
def git_tetris_ai():
if os.path.isfile("extras/README/7.gif") or platform.system() == "Windows":
Expand Down
18 changes: 18 additions & 0 deletions tests/test_vectroid.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#
# License: See LICENSE.md file
# GitHub: https://github.com/Baekalfen/PyBoy
#


import pytest

from pyboy import PyBoy

# https://gitlab.com/BonsaiDen/vectroid.gb
# https://gitlab.com/BonsaiDen/vectroid.gb/-/jobs/artifacts/master/raw/build/vectroid.gbc?job=build_rom


def test_vectroid(vectroid_file):
pyboy = PyBoy(vectroid_file, window="null")
pyboy.tick(120, False)
pyboy.screen.image

0 comments on commit 314789e

Please sign in to comment.