mirror of
https://github.com/rommapp/romm.git
synced 2026-11-29 01:58:41 +01:00
run fmt
This commit is contained in:
@@ -367,7 +367,10 @@ class GamelistHandler(MetadataHandler):
|
||||
for game in root:
|
||||
if game.tag not in ("game", "folder"):
|
||||
continue
|
||||
|
||||
path_elem = game.find("path")
|
||||
if path_elem is None or path_elem.text is None:
|
||||
continue
|
||||
|
||||
# Handle relative paths
|
||||
rom_path = path_elem.text
|
||||
|
||||
@@ -17,7 +17,8 @@ MOCK_METADATA = {
|
||||
|
||||
def test_parse_gamelist_xml_includes_folder_entries(tmp_path: Path, platform: Platform):
|
||||
gamelist_path = tmp_path / "gamelist.xml"
|
||||
gamelist_path.write_text("""<?xml version="1.0"?>
|
||||
gamelist_path.write_text(
|
||||
"""<?xml version="1.0"?>
|
||||
<gameList>
|
||||
<folder>
|
||||
<path>./Subfolder</path>
|
||||
@@ -26,7 +27,9 @@ def test_parse_gamelist_xml_includes_folder_entries(tmp_path: Path, platform: Pl
|
||||
<lang>en, fr</lang>
|
||||
<region>us, eu</region>
|
||||
</folder>
|
||||
</gameList>""", encoding="utf-8")
|
||||
</gameList>""",
|
||||
encoding="utf-8",
|
||||
)
|
||||
handler = GamelistHandler()
|
||||
|
||||
with (
|
||||
@@ -51,13 +54,16 @@ def test_parse_gamelist_xml_includes_folder_entries(tmp_path: Path, platform: Pl
|
||||
|
||||
def test_parse_gamelist_xml_keeps_game_entries(tmp_path: Path, platform: Platform):
|
||||
gamelist_path = tmp_path / "gamelist.xml"
|
||||
gamelist_path.write_text("""<?xml version="1.0"?>
|
||||
gamelist_path.write_text(
|
||||
"""<?xml version="1.0"?>
|
||||
<gameList>
|
||||
<game>
|
||||
<path>./test-rom.zip</path>
|
||||
<name>Game Entry</name>
|
||||
</game>
|
||||
</gameList>""", encoding="utf-8")
|
||||
</gameList>""",
|
||||
encoding="utf-8",
|
||||
)
|
||||
handler = GamelistHandler()
|
||||
|
||||
with (
|
||||
|
||||
Reference in New Issue
Block a user