Cant get Bootrom tests to pass

I am setting up a new install after not having touched this project in a while, I believe i have all the correct roms in the secrets folder but the bootrom tests arent getting some of the screenshots i guess? im not exactly sure whats being tested here but it bugs the hell out of me to have failing tests before i even begin. All other tests are passing except the bootrom ones and the open gl test but idc about that
/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:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/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:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
No description
No description
3 Replies
Bækalfen
Bækalfen2w ago
I see. I've made a mistake here to use the filename of the boot ROM for the test file. My DMG ROM is name DMG_ROM.bin Thank you for finding this. It of course shouldn't be like this
NicoleFaye
NicoleFayeOP2w ago
Sweet. Thanks! 🙂

Did you find this page helpful?