Successfully uninstalled pyboy-2.6.0
(.venv) root@localhost:/python/gameboy# pytest -vv --ignore=./tests/PyBoy
============== test session starts ===============
platform linux -- Python 3.11.2, pytest-8.4.1, pluggy-1.6.0 -- /root/.venv/bin/python3 ===================== ERRORS =====================
_______ ERROR collecting tests/test_emu.py _______
ImportError while importing test module '/sdcard/300/gameboy/tests/test_emu.py'.
Hint: make sure your test modules/packages have valid Python names. Traceback:
/root/.venv/lib/python3.11/site-packages/_pytest/python.py:498: in importtestmodule
mod = import_path(
/root/.venv/lib/python3.11/site-packages/_pytest/pathlib.py:587: in import_path
/root/.venv/lib/python3.11/site-packages/_pytest/assertion/rewrite.py:186: in exec_module
exec(co, module.__dict__)
tests/test_emu.py:16: in <module>
from pyboy_class import GameBoyInspector
tests/pyboy_class.py:31: in <module>
from PyBoy.pyboy.pyboy import PyBoy
tests/PyBoy/pyboy/__init__.py:15: in <module>
from .pyboy import PyBoy, PyBoyMemoryView, PyBoyRegisterFile
tests/PyBoy/pyboy/pyboy.py:16: in <module> from pyboy.api.constants import TILES, TILES_CGB
E ModuleNotFoundError: No module named 'pyboy'
============ short test summary info =============
ERROR tests/test_emu.py !!!!! Interrupted: 1 error during collection !!!!!
================ 1 error in 5.51s ================class LinkBoy(PyBoy, LinkDevice):
def RecievedFullByte(self):
self.memory[0xFF02] = clearBit(self.memory[0xFF02], 7)
self.mb.cpu.set_interruptflag(0b00001000)Traceback (most recent call last):
File "e:\LinkBoy\main.py", line 9, in <module>
link.step()
File "e:\LinkBoy\linkboy.py", line 75, in step
transfer.step()
File "e:\LinkBoy\linkboy.py", line 56, in step
self.slave.RecievedFullByte() #Notify the slave device the transfer has completed
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "e:\LinkBoy\linkboy.py", line 109, in RecievedFullByte
self.mb.cpu.set_interruptflag(0b00001000)
^^^^^^^
AttributeError: 'LinkBoy' object has no attribute 'mb'/home/nicole-demera/PyBoy/tests/test_bootroms.py::test_all_modes[any_rom_cgb-boot_rom-270-None] failed: cgb = None, _bootrom = 'test_roms/secrets/dmg_boot.bin', frames = 270
rom = 'test_roms/secrets/Pokemon - Crystal Version (UE) (V1.0) [C][!](1).gbc'
any_rom_cgb = 'test_roms/secrets/Pokemon - Crystal Version (UE) (V1.0) [C][!](1).gbc'
@pytest.mark.parametrize("cgb", [False, True, None])
@pytest.mark.parametrize("_bootrom, frames", [(lf("boot_cgb_rom"), 120), (lf("boot_rom"), 270), (None, 30)])
@pytest.mark.parametrize("rom", [lf("any_rom"), lf("any_rom_cgb")])
def test_all_modes(cgb, _bootrom, frames, rom, any_rom_cgb):
pyboy = PyBoy(rom, window="null", bootrom=_bootrom, cgb=cgb)
pyboy.tick(frames, True)
rom_name = "cgbrom" if rom == any_rom_cgb else "dmgrom"
cgb_mode = "cgb" if cgb is True else ("dmg" if cgb is False else "None")
png_path = Path(f"tests/test_results/all_modes/{rom_name}_{cgb_mode}_{os.path.basename(str(_bootrom))}.png")
image = pyboy.screen.image
if OVERWRITE_PNGS:
png_path.parents[0].mkdir(parents=True, exist_ok=True)
image.save(png_path)
else:
> old_image = PIL.Image.open(png_path).convert("RGB")
tests/test_bootroms.py:33:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ --sound--soundFile "pyboy/pyboy.py", line 139, in pyboy.pyboy.PyBoy.__init__
File "pyboy/core/mb.py", line 36, in pyboy.core.mb.Motherboard.__init__
File "pyboy/core/cartridge/cartridge.py", line 20, in pyboy.core.cartridge.cartridge.load_cartridge
File "pyboy/core/cartridge/cartridge.py", line 21, in pyboy.core.cartridge.cartridge.load_cartridge
File "pyboy/core/cartridge/cartridge.py", line 62, in pyboy.core.cartridge.cartridge.load_romfile
Exception: Bad ROM file sizefrom pyboy import PyBoy
pyboy = PyBoy('game_rom.gb')
while pyboy.tick():
pass
pyboy.stop()pyboy.memory[0xFF00:0xFFFF]from pyboy import PyBoy
pyboy = PyBoy("metroid2.gb")
while True:
pyboy.tick(render=True)