def test_console_apf_read_write(console, offscreen, tmpdir): libtcodpy.console_print(console, 0, 0, 'test') apf_file = tmpdir.join('test.apf').strpath assert libtcodpy.console_save_apf(console, apf_file) assert libtcodpy.console_load_apf(offscreen, apf_file) assertConsolesEqual(console, offscreen)