Files
nxnative-easy/scripts/tests/test_desktop_catalog.py
Erick Sanchez 6db52d357a Replace the fourth featured card with a searchable live game catalog
Read all checkout game profiles, search names, versions and title IDs without case or accent sensitivity, and link each result to its game notes. Localize the catalog in English and Spanish and verify discovery against the current profiles.
2026-10-26 11:28:53 -06:00

17 lines
724 B
Python

"""Execute the live catalog parser/search model used by the desktop UI."""
from pathlib import Path
import subprocess
import sys
import tempfile
import unittest
ROOT=Path(__file__).resolve().parents[2]
@unittest.skipUnless(sys.platform=='darwin','requires Swift Foundation')
class DesktopCatalog(unittest.TestCase):
def test_profile_discovery_and_search(self):
with tempfile.TemporaryDirectory() as tmp:
exe=Path(tmp)/'catalog'
subprocess.run(['xcrun','swiftc',str(ROOT/'desktop/NxNativeEasy/GameCatalog.swift'),
str(ROOT/'desktop/NxNativeEasy/tests/catalog_check.swift'),'-o',str(exe)],check=True)
subprocess.run([str(exe),str(ROOT)],check=True)