python3.13/tests/runtime/repro.py
Lukáš Zachar 59c48c8247 DO NOT MERGE the spec change
Adding test for inplace upgrade of running python
https://bugzilla.redhat.com/show_bug.cgi?id=233385
2025-05-16 09:44:04 +02:00

19 lines
378 B
Python

import time
from pathlib import Path
flag_file = Path('/tmp/runtime')
status_file = Path('/tmp/runtime_status')
assert not flag_file.exists()
print(f'Started - touch {flag_file} when ready')
print(f'Status in {status_file}')
status_file.write_text('running')
while not flag_file.exists():
time.sleep(2)
import email.parser
print('DONE')
status_file.write_text('PASS')