import os from pathlib import Path import subprocess import sys import time import pytest @pytest.mark.parametrize('mode',['hash','copy','validate']) def test_actual_app_exits_without_releasing_stalled_manifest_boundary(tmp_path,mode): script=Path(__file__).parent/'support/manifest_process_exit.py' env=dict(os.environ,QT_QPA_PLATFORM='offscreen') child=subprocess.Popen([sys.executable,'-X','utf8',str(script),str(tmp_path),mode], env=env,stdout=subprocess.PIPE,stderr=subprocess.PIPE,text=True) exited=False try: deadline=time.monotonic()+8 while not (tmp_path/'main-returning').exists() and child.poll() is None and time.monotonic()