Files
metin2-client/tests/wiki/test_port_gate_status.py
T
shenandshen 846a993183 feat: complete xxf-ch5 35 features migration, protocol bindings, and gate validation
- S1: Chinese locale pack, target HP/drop preview, elemental icons, exchange level display, item highlight, FOV settings, advanced skybox, GM warp.
- S2: 5-page 225-slot inventory, seamless channel switch, wiki/drop query/chest preview.
- S3: Auto-refine/attribute locks, sash combine/absorb, talisman/elemental stats, costume/mount/shining slots, changelook, soulbind, glove, quiver, magic reduction.
- S4: Modern cube renewal, mythic dragon soul (6 grades/1152 slots), DS attr change, global rankings, dice system.
- S5: Multi-token shop, offline private shop search, offline shop state machine, 64-bit gold alignment, Won dual currency exchange.
- S6: Single account 5-character slot adaptive wire protocol, Wolfman profession & claw weapon/applies, Conqueror level & Sungma attributes, pets & 6th/7th attrs, battle pass & boss tracking.
- Pass 42/42 platform gate test suites in scripts/port_gate.sh macos.
2026-10-22 01:29:14 -07:00

23 lines
997 B
Python

"""Non-PASS gate states must fail, including missing toolchain and unknown names."""
import os
from pathlib import Path
import subprocess
import tempfile
import unittest
ROOT=Path(__file__).resolve().parents[2]
class PortGateStatusTests(unittest.TestCase):
def run_gate(self,name,**overrides):
with tempfile.TemporaryDirectory() as tmp:
env=dict(os.environ,MT_PORT_GATE_DIR=tmp,**overrides)
return subprocess.run(['bash',str(ROOT/'scripts/port_gate.sh'),name],env=env,cwd=ROOT,capture_output=True,text=True)
def test_unknown_platform_is_not_success(self):
result=self.run_gate('planb_unknown')
self.assertNotEqual(result.returncode,0);self.assertIn('UNKNOWN',result.stdout)
def test_missing_ndk_is_not_success(self):
result=self.run_gate('android',ANDROID_NDK_ROOT='/nonexistent/planb-ndk',ANDROID_HOME='/nonexistent/planb-sdk')
self.assertNotEqual(result.returncode,0);self.assertIn('android BLOCKED',result.stdout)