Files
EscapistsReintroduced/tests/test_native_observer_selector.py
T
jakub 6a667d8deb Capture current mission, AI, map and administration development
Include the current addon, terrain integrations, tools, regression tests and recorded development evidence.
2026-10-13 22:52:53 +02:00

15 lines
939 B
Python

"""Wrong camera-fixture selector must fail before profile or engine setup."""
from pathlib import Path
import subprocess,sys,tempfile
ROOT=Path(__file__).resolve().parents[1]
with tempfile.TemporaryDirectory(prefix='erri-observer-selector-') as folder:
root=Path(folder)
result=subprocess.run([sys.executable,'-B',str(ROOT/'tools/headless_workbench.py'),
'--steam',str(root/'missing-steam'),'--compat',str(root/'missing-prefix'),
'--profile',str(root/'unused-profile'),'--smoke','unconscious-camera',
'--project','chat','--rounds','1'],capture_output=True,text=True)
assert result.returncode==2,(result.returncode,result.stdout,result.stderr)
assert 'unconscious-camera requires --project core' in result.stderr,result.stderr
assert not list(root.iterdir()),'Invalid selection must not create native runtime/profile files'
print('PASS: wrong observer fixture selector rejected before runtime/profile setup; no engine launched')