41 lines
1.4 KiB
Python
41 lines
1.4 KiB
Python
from tests.timer_contract_support import run_timer_contract, assert_current_build_contract
|
|
from pathlib import Path
|
|
|
|
ROOT = Path(__file__).resolve().parents[1]
|
|
APP_JS = (ROOT / "ui_builder/static/app.js").read_text(encoding="utf-8")
|
|
APP = (ROOT / "app.py").read_text(encoding="utf-8")
|
|
|
|
|
|
def _block(start: str, end: str) -> str:
|
|
return APP_JS.split(start, 1)[1].split(end, 1)[0]
|
|
|
|
|
|
def test_prepared_penalty_shows_stopped_time_when_scoreboard_is_live():
|
|
"""Current native timer contract, executed against production functions."""
|
|
run_timer_contract('prepared_emission')
|
|
run_timer_contract('prepared_penalty')
|
|
|
|
|
|
def test_penalty_vmix_display_uses_only_started_or_paused_active_penalties():
|
|
"""Current native timer contract, executed against production functions."""
|
|
run_timer_contract('penalty_priority')
|
|
|
|
|
|
def test_main_countdown_start_pause_stop_all_hard_sync_web_value():
|
|
"""Current native timer contract, executed against production functions."""
|
|
run_timer_contract('native_events')
|
|
run_timer_contract('explicit_edit')
|
|
|
|
|
|
# Native penalty transitions are exercised in test_stage2_penalty_countdown.py.
|
|
|
|
|
|
def test_combined_shortcut_changes_web_first_then_synchronizes_vmix():
|
|
"""Current native timer contract, executed against production functions."""
|
|
run_timer_contract('web_first')
|
|
run_timer_contract('shortcut_resume')
|
|
|
|
|
|
def test_build95_runtime_version():
|
|
assert_current_build_contract()
|