Include the current addon, terrain integrations, tools, regression tests and recorded development evidence.
15 lines
939 B
Python
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')
|