mirror of
https://github.com/kuhyx/testsAndMisc.git
synced 2026-11-10 22:47:02 +01:00
transcribe_helpers.py is 289 lines against the 250-line cap and was completely untested. Tests land first, in their own commit, so the split that follows is verified against tests that predate the seam. Left at its current path rather than moved under python_pkg/: transcribe.sh invokes it by path inside a dedicated ML venv, and transcribe_fw.py imports two siblings by bare name, so the closure is five files (1236 lines), not three. Tests go in linux_configuration/tests/ instead, whose conftest already puts standalone script directories on sys.path - the same arrangement the usage_report work used, and still collected by CI. The ML dependencies are never installed in CI and the module reaches them only through _try_import, so patching that one seam covers every probe in both directions. An AST scan at every nesting level confirmed there is no other path to them: the only direct numpy imports sit under TYPE_CHECKING. 41 tests, 100% line and branch. The last gap was the dispatch guard at line 284, unreachable through the CLI because argparse's choices list and the dispatch dict carry the same eight commands; covering it by admitting a ninth choice also documents why the guard is there. Split across four test files because a single module hit 291 lines - over the cap this work exists to clear. Verified: python-version prints 3.14, check-faster-whisper exits 7 with no ML deps present, generate-wav writes a 96044-byte WAV; 243 tests pass in the directory, up from 202 by exactly the 41 added. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011w2Pj4Ek3ZNMQVYcFHgXDY |
||
|---|---|---|
| .. | ||
| lib | ||
| __init__.py | ||
| conftest.py | ||
| test_android_guardian_post_fs_data.sh | ||
| test_android_guardian_service.sh | ||
| test_fast_count.py | ||
| test_hosts_file_monitor.sh | ||
| test_hosts_guard_pacman_integration.sh | ||
| test_i3blocks_efficiency.sh | ||
| test_i3blocks_persist_common.sh | ||
| test_makepkg_capped.sh | ||
| test_makepkg_wrapper.sh | ||
| test_monitor_report.py | ||
| test_music_parallelism.sh | ||
| test_network_diagnostics.bats | ||
| test_pacman_wrapper_security.sh | ||
| test_security_hardening.sh | ||
| test_session_autopsy_hooks.py | ||
| test_setup_dns_blocker.sh | ||
| test_shutdown_timer_monitor.sh | ||
| test_strip_workout_hosts.py | ||
| test_transcribe_helpers_cli.py | ||
| test_transcribe_model_ops.py | ||
| test_transcribe_probes.py | ||
| test_transcribe_wav.py | ||
| test_usage_monitoring_installer_efficiency.sh | ||
| test_usage_report_aggregate.py | ||
| test_usage_report_atop_build.py | ||
| test_usage_report_atop_io.py | ||
| test_usage_report_atop_pipeline.py | ||
| test_usage_report_cli.py | ||
| test_usage_report_emit.py | ||
| test_usage_report_format.py | ||
| test_usage_report_gpu_table.py | ||
| test_usage_report_host.py | ||
| test_usage_report_merge.py | ||
| test_usage_report_modes.py | ||
| test_usage_report_parse_records.py | ||
| test_usage_report_pmon_names.py | ||
| test_usage_report_render.py | ||
| test_usage_report_run_since.py | ||
| test_usage_report_segments.py | ||
| test_usage_report_since.py | ||
| test_usage_report_tables.py | ||
| test_validate_contract.py | ||
| test_validate_evidence.py | ||