Orchestrata Ultimate › Tests › Reference › core › threading

Tests reference — tests/core/threading

tests/core/threading — 19 test modules, 314 test functions (cumulative over subdirectories). Source tree: tests/core/threading at commit 8a2cb42ad. Generated from the tests AST snapshot by scripts/gen-data-pages.py.

Prose pending.

Subdirectories

Directory Modules Tests
fixtures/ 8 12

Modules

Module Tests Covers
_batch_budget.py 0 1
test_durations_identity.py 11 1
test_failure_detail.py 7 3
test_live_observer.py 55 3
test_pytest_live_reader.py 36 1
test_pytest_session_broadcast.py 21 1
test_test_executor.py 19 1
test_test_executor_helpers.py 74 2
test_test_scheduler.py 23 1
test_thread_pool.py 26 1
test_thread_pool_extended.py 30 1

Module details

tests/core/threading/_batch_budget.py

source · 0 tests · 100 lines

Calibrate a SIGKILL-scenario batch budget to THIS host's child-pytest boot.

Covers: core.threading.test_executor

tests/core/threading/test_durations_identity.py

source · 11 tests · 388 lines

Tests for run identity on the per-test duration records.

Covers: core.threading.pytest_live_observer

Kind Name Line Description
function test_identity_is_read_from_the_environment 27 The channel that crosses the subprocess boundary.
function test_absent_fields_are_OMITTED_not_written_as_null 46 Absence is a different claim from emptiness.
function test_the_lane_reuses_the_slot_variable_the_executor_already_sets 62 No new plumbing for a value that already crosses the boundary.
function test_rows_carry_only_the_keys_they_cannot_be_joined_without 72 Per-run constants belong on the header, not on 33,000 rows.
function test_the_header_is_invisible_to_the_existing_reader 125 scripts/test_durations.py skips any line whose "test" is not a str.
function test_the_writer_still_honours_its_disable_switch 143 Adding fields must not quietly re-enable a sink someone turned off.
function test_phase_rows_join_to_duration_rows_by_the_same_identity 164 A duration row and its test's phase rows are written to different
function test_phase_durations_header_is_invisible_to_the_test_str_reader 227 Same convention as the duration sink's header
function test_phase_durations_writer_honours_the_shared_disable_switch 254 One switch for the whole durations subsystem, not two to remember.
function test_concurrent_thread_appends_never_tear_a_line 313 N threads, one sink, blocks larger than any stream buffer.
function test_concurrent_process_appends_never_tear_a_line 349 The production shape: separate PROCESSES appending, as the batched

tests/core/threading/test_failure_detail.py

source · 7 tests · 217 lines

Tests for the batched runner's full failure detail: failure_detail and

Covers: core.threading.failure_detail, core.threading.pytest_live_reader, core.threading.test_executor

Kind Name Line Description
function test_every_batch_gets_long_tracebacks_locals_and_captured_streams 113
function test_an_option_the_caller_set_is_left_alone 123
function test_a_junit_failure_carries_every_frame_its_locals_and_streams 131
function test_a_batch_without_junit_still_says_why_its_module_failed 142
function test_a_hung_module_carries_the_stack_dump_of_its_killed_batch 164
function test_a_secret_environment_value_is_redacted_by_name 199
function test_a_tail_cut_through_a_secret_keeps_none_of_it 208

tests/core/threading/test_live_observer.py

source · 55 tests · 1344 lines

Tests for pytest_live_observer.py: the real-time, SIGKILL-durable pytest

Covers: core.threading.pytest_live_observer, core.threading.pytest_live_reader, core.threading.test_executor

Kind Name Line Description
function test_plugin_stays_inert_when_log_path_is_unwritable 38 PYTEST_LIVE_LOG pointed at a path open(..., "a") can't write to
function test_emit_swallows_write_errors 66 _emit must never raise even when writing genuinely fails.
function test_runtest_logreport_ignores_unexpected_phase 83 Only "setup"/"call"/"teardown" are real TestReport phases; the
function test_plugin_writes_flushed_ndjson_with_outcomes 124 Real pytest subprocess on a 1-pass/1-fail module: the live log must
function test_plugin_emits_collect_error_for_a_module_that_fails_to_import 158 A module that raises on import (never reaches any test) is reported
function test_plugin_is_inert_without_the_env_var 180 No PYTEST_LIVE_LOG set -> the plugin loads fine but every hook is
function test_read_live_results_tolerates_truncated_final_line 208 A mid-write SIGKILL can leave the final NDJSON line half-written;
function test_read_live_results_missing_file_returns_empty_dict 240
function test_read_live_results_counts_terminal_outcomes_in_junit_vocabulary 245 Per-file counts reconstruct a killed batch's JUnit tally from the
function test_read_live_results_reduces_collect_error_to_ran_and_failed 298 A collect_error event (pytest_collectreport) has no matching
function test_durations_ndjson_path_default_is_cwd_reports 324 Default resolution: <cwd>/reports/test-durations.ndjson. Exercised via
function test_durations_ndjson_path_override 334
function test_append_test_durations_writes_ndjson_lines 342
function test_append_test_durations_appends_across_calls 357
function test_append_test_durations_noop_when_disabled 369
function test_append_test_durations_noop_on_empty_records 381
function test_append_test_durations_swallows_write_errors 389 Pointing the path AT a directory (not a file) makes the real open
function test_phase_durations_ndjson_path_default_is_cwd_reports 405 Mirrors test_durations_ndjson_path_default_is_cwd_reports above:
function test_phase_durations_ndjson_path_override 414
function test_append_test_phase_durations_writes_ndjson_lines 434
function test_append_test_phase_durations_appends_across_calls 449
function test_append_test_phase_durations_noop_when_disabled 461
function test_append_test_phase_durations_noop_on_empty_records 473
function test_append_test_phase_durations_swallows_write_errors 481 Pointing the path AT a directory (not a file) makes the real open
function test_real_run_flushes_durations_automatically 531 The plan's own Phase 3.3 verification: run ANY test module the
function test_real_run_flushes_phase_durations_automatically_and_joins 585 Recommendation #2's own verification, mirroring the Phase 3.3 one
function test_real_run_with_a_failure_still_records_its_duration 622 A failing test's terminal (call) duration is collected too --
function test_real_run_records_known_slow_marker_in_durations 637 A test carrying @pytest.mark.known_slow gets its reason recorded
function test_real_run_durations_disabled_writes_nothing 659
function test_real_run_disabled_switch_also_stops_phase_durations 687 The shared PYTEST_DURATIONS_DISABLED switch turns off BOTH sinks
function test_pytest_sessionfinish_flushes_the_module_level_buffer 720 Direct hook-level test (not a subprocess): pytest_sessionfinish must
function test_pytest_sessionfinish_flushes_the_phase_duration_buffer 743 Sibling of the module-level-buffer test above, for
function test_runtest_logreport_collects_call_phase_duration_via_state_seam 767 The _state DI-seam path (used by
function test_runtest_logreport_collects_all_three_phase_durations_via_state_seam 793 Recommendation #2: UNLIKE _test_durations above (terminal phase
function test_fixture_setup_hookwrapper_is_pure_passthrough_when_gate_unset 860 DONE WHEN #1: with the gate unset, behaviour is byte-identical to
function test_fixture_setup_hookwrapper_writes_a_record_when_gated_on 876 Gate on: one NDJSON line lands under ORCH_FIXTURE_COST_DIR, keyed by
function test_fixture_setup_hookwrapper_records_and_repropagates_on_exception 914 A fixture that raises must still be timed and flagged excepted, and
function test_fixture_setup_hookwrapper_swallows_a_real_write_failure 932 Best-effort, like every other writer in this module (_emit,
function test_fixture_setup_hookwrapper_omits_absent_join_keys 951 A bare invocation with no ORCH_RUN_ID/ORCH_BATCH_ID (not run under the
function test_real_run_emits_fixture_cost_records_when_gated_on 1004 Live sample, n=1 -- the research record's own acceptance bar: run the
function test_real_run_gate_unset_writes_no_fixture_cost_output 1032 DONE WHEN #1, at the real-subprocess level: the SAME fixture module,
function test_executor_rescues_fast_module_and_names_hung_test_on_sigkill 1051 The durability proof: a batch containing a fast-passing module AND a
function test_multi_file_refusal_exits_at_collection_without_stamp 1093 A 2-file pytest run WITHOUT ORCHESTRATA_SANCTIONED_RUNNER stamps
function test_multi_file_refusal_returns_message 1140 multi_file_refusal returns the exit message.
function test_real_run_announces_its_selection_at_collection_finish 1195 collection_finished carries what THIS session will run -- the selected
function test_real_multi_file_run_announces_its_selection_before_refusing 1216 The selection is announced BEFORE the RUL-038 multi-file refusal, so the
function test_deadline_returns_none_when_env_unset_and_key_missing 1241 Branch: env is None and key missing → raw = os.environ.get(...).
function test_deadline_returns_none_when_env_has_empty_value 1251 Branch: env has empty string → raw is empty → returns None (L860).
function test_deadline_returns_none_on_invalid_value 1259 Branch: ValueError when parsing float → returns None (not raises).
function test_deadline_returns_parsed_timestamp 1268 Branch: valid float string → return timestamp.
function test_real_run_past_its_deadline_records_capped_and_exits 1279 A child whose deadline passes mid-test stops itself AT the cap: the
function test_hard_stop_checks_pgrp 1298 Branch: os.getpgrp() == os.getpid() check in _hard_stop.
function test_arm_deadline_returns_none_when_no_deadline 1309 Branch: deadline is None (from _deadline) → returns None.
function test_arm_deadline_schedules_timer_when_deadline_present 1319 Branch: deadline is present → schedule timer.
function test_pytest_configure_arms_deadline 1339 pytest_configure calls arm_deadline.

tests/core/threading/test_pytest_live_reader.py

source · 36 tests · 626 lines

The pytest-FREE reader half of the live observer.

Covers: core.threading.pytest_live_reader

Kind Name Line Description
function test_the_reader_imports_with_pytest_unavailable 71
function test_the_registry_lives_under_xdg_runtime_dir_when_set 88
function test_the_registry_is_private 95 0700: session entries carry pids and log paths for a live run.
function test_sessions_come_back_newest_first 106
function test_a_half_written_entry_does_not_hide_the_others 115 A killed process can leave a truncated entry mid-write.
function test_a_missing_registry_reads_as_no_sessions 129
function test_pruning_removes_entries_whose_process_is_gone 133
function test_results_are_reduced_per_test_file 158
function test_a_setup_failure_counts_as_an_error_not_a_failure 177 JUnit vocabulary, because these counts fold into the suite totals.
function test_a_test_that_started_but_never_reported_is_hung 196 The in-flight test when a batch was SIGKILLed — the whole point of the
function test_a_truncated_final_line_does_not_lose_the_completed_tests 207 A mid-write SIGKILL leaves a partial last line; everything before it is
function test_a_missing_log_reads_as_no_results 232 The plugin was never loaded, or nothing was written yet.
function test_a_collection_error_marks_the_file_failed 237
function test_read_collection_counts_returns_none_when_file_missing 249 Branch: OSError in open() → return None.
function test_read_collection_counts_returns_none_when_invalid_json 254 Branch: ValueError when parsing line → continue.
function test_read_collection_counts_returns_none_when_no_collection_finished 261 Branch: Never finds collection_finished event → return None (found stays None).
function test_read_collection_counts_returns_counts_from_collection_finished 273 Branch: Finds collection_finished → return (selected, files).
function test_read_collection_counts_takes_last_collection_finished 286 The LAST collection_finished event wins.
function test_read_collection_counts_handles_missing_selected_or_files_fields 297 Branch: record.get("selected") or record.get("files") is falsy → use 0.
function test_count_selected_returns_zero_for_empty_paths 312 Branch: if not paths → return 0 (L356).
function test_count_selected_counts_tests_from_collect_only 324 Real subprocess: --collect-only with observer plugin writes collection_finished.
function test_count_selected_handles_timeout 340 Branch: TimeoutExpired → kill process, total = None.
function test_count_selected_handles_process_lookup_error 365 Branch: ProcessLookupError in os.killpg → proc.kill().
function test_count_selected_handles_missing_collection_counts 374 Branch: counts is None → total = None (L408).
function test_run_progress_returns_empty_when_empty_run_id 396 Branch: if not run_id → return empty dict (L423).
function test_run_progress_sums_counts_from_matching_sessions 403 Branch: Sum counts from sessions with matching run_id.
function test_format_progress_with_none_selected 460 Branch: selected is None → sel, left = '?', '?' (L442-443).
function test_format_progress_with_known_selected 468 Branch: selected is known → calculate left (L444-445).
function test_format_progress_with_zero_left 476 Branch: selected - run <= 0 → left = 0.
function test_format_progress_zero_run 484 Branch: run = 0.
function test_progressticker_init_stores_parameters 495 Branch: init stores all parameters.
function test_progressticker_start_starts_thread 521 Branch: start() starts the _loop thread.
function test_progressticker_line_returns_formatted_progress 539 Branch: line() calls format_progress with current run_progress.
function test_progressticker_tick_emits_line_with_prefix 576 Branch: tick() prepends prefix and emits the line.
function test_progressticker_stop_joins_thread 596 Branch: stop() sets _stopped and joins thread.
function test_progressticker_loop_stops_when_stopped 612 Branch: _loop() exits when _stopped is set.

tests/core/threading/test_pytest_session_broadcast.py

source · 21 tests · 550 lines

Tests for the pytest_live_observer.py session-registry BROADCAST: a

Covers: core.threading.pytest_live_observer

Kind Name Line Description
function test_sessionstart_broadcasts_registry_entry_with_explicit_live_log_path 87 PYTEST_LIVE_LOG set (the batched-executor path): the registry
function test_sessionstart_without_pytest_live_log_creates_and_broadcasts_its_own_ndjson 115 No PYTEST_LIVE_LOG (a bare pytest -p ... invocation): the
function test_registry_entry_is_running_mid_session_then_flips_to_finished 137 A session's registry entry is observable as status="running"
function test_list_active_sessions_returns_finished_entry 195
function test_list_active_sessions_orders_newest_first 205
function test_list_active_sessions_tolerates_corrupt_entry 216
function test_list_active_sessions_tolerates_an_unreadable_entry 232 A *.json glob hit that isn't actually a readable file (here: a
function test_session_registry_dir_falls_back_to_tmp_when_xdg_unset 252
function test_session_registry_dir_survives_a_chmod_failure 258 chmod is best-effort -- if it raises, the directory is still
function test_list_active_sessions_returns_empty_when_registry_dir_is_blocked 275 A file sitting where the registry dir's parent should be makes
function test_prune_stale_sessions_returns_zero_when_registry_dir_is_blocked 285
function test_prune_stale_sessions_drops_dead_pid_and_old_finished_entries 296
function test_prune_stale_sessions_tolerates_corrupt_and_non_dict_entries 363 A mid-write-truncated entry (invalid JSON) or one that parsed to a
function test_prune_stale_sessions_keeps_recent_finished_entry 385
function test_pid_is_alive_true_for_self_and_false_for_exited_process 413
function test_pid_is_alive_true_for_a_foreign_owned_process 419 pid 1 (init/systemd) exists but is owned by root; signalling it as
function test_ndjson_writer_observer_writes_event_to_its_log_path 427
function test_session_registry_observer_counts_and_status_transitions 443
function test_session_registry_observer_write_is_throttled_but_never_loses_counts 482 Successive report events within the throttle window skip the disk
function test_session_registry_observer_write_swallows_oserror 511 A write failure (here: the registry path's parent directory doesn't
function test_sessionstart_swallows_registry_setup_failure 526 If session_registry_dir() raises, pytest_sessionstart must

tests/core/threading/test_test_executor.py

source · 19 tests · 699 lines

Unit tests for ParallelTestExecutor (thread-based mode).

Covers: core.threading.test_executor

Kind Name Line Description
function test_run_tests_parallel_success 112
function test_run_tests_parallel_multiple 118
function test_run_tests_in_parallel_convenience 141
function test_per_module_attribution_within_a_batch 154 A failing module is reported failed and a co-batched passing module is NOT.
function test_batched_executor_wires_phase_durations_with_the_batch_identity 182 End-to-end through the REAL production wiring (test_executor.py's
function test_batch_headers_always_carry_a_run_id_without_run_tests_py 236 Regression for the 2026-08-19 defect: profiling reports/test-
function test_ensure_run_identity_env_mints_identity_when_absent 304 The no-ORCH_RUN_ID-at-all case -- ParallelTestExecutor used
function test_ensure_run_identity_env_preserves_caller_supplied_values 320 setdefault, not assignment: a caller (run_tests.py, CI, this
function test_ensure_run_identity_env_never_raises_when_git_is_unavailable 333 A missing git binary (empty PATH) must never break test
function test_backfill_path_mixes_static_and_drained_batches 349 backfill_fraction &gt; 0 end-to-end: the smallest modules are held
function test_timed_out_module_is_not_reported_as_pass 416 A module that exceeds the batch timeout is reported failed, never passed.
function test_run_tests_parallel_async_success 610 Async counterpart of run_tests_parallel: happy-path presence + rc.
function test_run_tests_parallel_async_multiple_modules 617 Async happy path across several batches (exercises the success loop).
function test_run_tests_parallel_async_single_module 636 The async SINGLE-module dispatch path, exercised independently of the
function test_run_tests_parallel_async_per_module_attribution 656 Async counterpart of the sync JUnit-attribution regression test.
function test_run_tests_in_parallel_async_convenience 688 The async convenience wrapper creates, runs, and always stops the executor.
class TestRerunRoundSafetyNet 498 Phase-2B: a module a batch never even STARTED (as opposed to one that
method TestRerunRoundSafetyNet.test_module_that_never_started_passes_on_the_rerun 529
method TestRerunRoundSafetyNet.test_rerun_writes_observed_durations_to_the_cache 563 The rerun round's own JUnit timing feeds the SAME persisted
method TestRerunRoundSafetyNet.test_async_module_that_never_started_passes_on_the_rerun 576 Async counterpart: the rerun round also runs on the async path.

tests/core/threading/test_test_executor_helpers.py

source · 74 tests · 1051 lines

Tests for test_executor helper functions.

Covers: core.threading.test_executor, core.threading.thread_pool

Kind Name Line Description
class TestRunSubprocessLiveLogWithoutSlotQueue 39 live_log_path must work even when slot_queue is None -- the
method TestRunSubprocessLiveLogWithoutSlotQueue.test_sets_pytest_live_log_env_without_slot_queue 44
class TestAttributeFromJunitLiveLogRescue 59 Unit-level (no subprocess) coverage of the Part-3 rescue path: when
method TestAttributeFromJunitLiveLogRescue.test_no_rescue_when_live_log_file_is_missing 65 The live-log path is a no-op guard, not a crash, when the file
method TestAttributeFromJunitLiveLogRescue.test_no_rescue_when_live_log_has_no_entry_for_the_module 83 The live-log file exists (so the os.path.exists guard passes)
method TestAttributeFromJunitLiveLogRescue.test_rescues_passed_module_from_live_log 105 JUnit wrote nothing (simulating a SIGKILL) but the live-log shows
method TestAttributeFromJunitLiveLogRescue.test_last_active_module_is_not_rescued_green 148 A module whose observed tests all look terminal but which was the
method TestAttributeFromJunitLiveLogRescue.test_rescues_failed_module_from_live_log 183 Same as the passed-module rescue, but the live-log shows the
method TestAttributeFromJunitLiveLogRescue.test_marks_hung_module_failed_naming_the_nodeid 217 The live-log shows a dangling start (no terminal report) --
method TestAttributeFromJunitLiveLogRescue.test_does_not_touch_modules_junit_already_attributed 240 A module JUnit DID attribute (status is not None) must be left
class TestBatchModules 264
method TestBatchModules.test_even_split 265
method TestBatchModules.test_uneven_split 269
class TestRunSubprocess 275
method TestRunSubprocess.test_success 276
method TestRunSubprocess.test_generic_exception_returns_error_dict 281 A command that can't even start (no such executable) hits the
class TestCollectResult 296
method TestCollectResult.test_success 297
method TestCollectResult.test_unknown_task_id_returns_error_dict 306 An unknown task_id makes pool.get_task_result raise KeyError;
class TestCollectResultAsync 322
method TestCollectResultAsync.test_success 323
method TestCollectResultAsync.test_unknown_task_id_returns_error_dict 332 Async counterpart: an unknown task_id makes pool.wait_for_task
class TestPurgeStaleBatchCoverage 350 _purge_stale_batch_coverage removes leftover per-batch coverage
method TestPurgeStaleBatchCoverage.test_purges_batch_files_when_cov_active 356
method TestPurgeStaleBatchCoverage.test_keeps_batch_files_without_cov 367
class TestDurationCache 374 The persisted per-module duration cache LPT packing reads/writes.
method TestDurationCache.test_load_missing_file_returns_empty 377
method TestDurationCache.test_load_corrupt_file_returns_empty 380
method TestDurationCache.test_load_non_dict_payload_returns_empty 385
method TestDurationCache.test_load_skips_non_numeric_and_bool_values 390 True/False are int subclasses in Python -- must not
method TestDurationCache.test_save_then_load_round_trips 398
method TestDurationCache.test_save_creates_missing_parent_directory 403
method TestDurationCache.test_save_to_unwritable_path_is_best_effort 408 A "path" that is actually an existing directory can never be
class TestEstimateDurations 418
method TestEstimateDurations.test_uses_cached_value_when_present 419
method TestEstimateDurations.test_unknown_module_gets_median_of_history 423
method TestEstimateDurations.test_empty_history_falls_back_to_flat_default 428
class TestLptPackModules 433 LPT bin packing: the fix for the 2026-07-08 round-robin defect
method TestLptPackModules.test_empty_modules_returns_empty 439
method TestLptPackModules.test_balances_load_far_tighter_than_round_robin 442
method TestLptPackModules.test_isolates_a_single_outlier_module_like_the_diagnosed_batch 455 Scaled-down replay of the measured 2026-07-08 scenario: one
method TestLptPackModules.test_grows_bin_count_when_combined_load_exceeds_target 470 Six modules of equal, moderate cost: no single one exceeds the
method TestLptPackModules.test_single_oversized_module_is_accepted_alone_without_looping_forever 484 A module whose own duration exceeds the target is irreducible
method TestLptPackModules.test_stops_growing_at_max_bins_even_if_target_still_unmet 494 max_bins is a hard ceiling: when it equals the starting bin
method TestLptPackModules.test_missing_history_is_deterministic_and_stable 512 No duration estimate for any module -- every module defaults to
class TestResourceGroups 525 Resource-group co-scheduling: modules that contend on the same shared
method TestResourceGroups.test_memgraph_group_lists_the_six_profiled_modules 534
method TestResourceGroups.test_merge_collapses_a_fully_present_group_into_one_synthetic_item 546
method TestResourceGroups.test_merge_ignores_group_with_only_one_member_present 558 A single present member has nothing to co-schedule against --
method TestResourceGroups.test_merge_partial_membership_still_groups_present_members 571
method TestResourceGroups.test_merge_with_unknown_group_pattern_is_a_pure_pass_through 581
method TestResourceGroups.test_merge_with_empty_groups_map_is_a_pure_pass_through 591
method TestResourceGroups.test_expand_restores_real_paths_inside_the_bin_they_landed_in 601
method TestResourceGroups.test_expand_is_a_no_op_when_nothing_was_merged 607
method TestResourceGroups.test_group_never_split_across_bins_even_under_many_bins 611 The core guarantee: however many bins LPT is given, and however
method TestResourceGroups.test_non_group_modules_are_still_lpt_balanced_normally 634 Resource grouping must not degrade ordinary LPT balancing for
class TestPrepareBatchesResourceGroups 660 _prepare_batches end-to-end: the merge/LPT-pack/expand pipeline
method TestPrepareBatchesResourceGroups.test_prepare_batches_keeps_a_full_group_in_one_batch 665
method TestPrepareBatchesResourceGroups.test_prepare_batches_defaults_to_module_level_resource_groups 682 No explicit resource_groups -- falls back to the real
method TestPrepareBatchesResourceGroups.test_gil_unsafe_module_gets_its_own_exclusive_batch 702 A GIL_UNSAFE_MODULES member must never share a pytest
class TestModuleDurationsFromJunit 730
method TestModuleDurationsFromJunit.test_sums_testcase_times_per_module 731
method TestModuleDurationsFromJunit.test_missing_junit_returns_empty 748
method TestModuleDurationsFromJunit.test_malformed_time_attribute_treated_as_zero 753
class TestSummarizeRerun 766
method TestSummarizeRerun.test_splits_passed_and_still_failed 767
class TestDidNotRunModules 781
method TestDidNotRunModules.test_finds_only_modules_flagged_did_not_run 782
method TestDidNotRunModules.test_hard_kill_wording_is_flagged_too_not_just_the_graceful_message 797 A module dropped by an EXTERNAL hard SIGKILL carries a different
method TestDidNotRunModules.test_module_with_no_did_not_run_flag_is_not_flagged 813
class TestBatchPytestArgs 818 Per-batch args: xdist/cacheprovider hard-disabled, faulthandler
method TestBatchPytestArgs.test_xdist_and_cacheprovider_are_disabled_in_every_batch 824
method TestBatchPytestArgs.test_faulthandler_timeout_is_per_test_timeout_plus_30 830
method TestBatchPytestArgs.test_faulthandler_timeout_reads_the_two_token_timeout_form 835
method TestBatchPytestArgs.test_faulthandler_default_is_150_when_no_per_test_timeout_given 840
method TestBatchPytestArgs.test_caller_supplied_faulthandler_timeout_wins 845
method TestBatchPytestArgs.test_session_timeout_still_appended_after_the_new_flags 851
class TestDottedModuleMapPathForms 856 Regression (2026-07-10): the old blind /→. translation turned
method TestDottedModuleMapPathForms.test_relative_in_tree_path_keeps_full_dotted_form 864
method TestDottedModuleMapPathForms.test_absolute_in_tree_path_is_relativized_before_dotting 868
method TestDottedModuleMapPathForms.test_absolute_out_of_tree_path_maps_to_bare_stem 875
class TestTestcaseMatchesPathNormalization 881
method TestTestcaseMatchesPathNormalization.test_rootdir_relative_file_attr_matches_absolute_cmdline_path 882 pytest writes file relative to its rootdir (../../tmp/...
method TestTestcaseMatchesPathNormalization.test_basename_alone_still_never_matches 895 The collision guard stands: a bare same-named file elsewhere must
class TestModuleTestcaseCounts 906
method TestModuleTestcaseCounts.test_tallies_status_per_module_severest_tag_wins 907
method TestModuleTestcaseCounts.test_missing_junit_returns_empty 938
class TestHoldBackBackfill 946 _hold_back_backfill — the 2026-08-05 dynamic tail-filling partition.
method TestHoldBackBackfill.test_fraction_zero_is_a_no_op 960
method TestHoldBackBackfill.test_zero_total_mass_is_all_static 970
method TestHoldBackBackfill.test_holds_back_smallest_until_budget_and_conserves_modules 983
method TestHoldBackBackfill.test_protected_modules_are_never_held 996
method TestHoldBackBackfill.test_backfill_batches_respect_target_seconds 1009
method TestHoldBackBackfill.test_prepare_batches_appends_backfill_after_static_bins 1026

tests/core/threading/test_test_scheduler.py

source · 23 tests · 232 lines

Tests for orchestrata_ultimate.core.threading.test_scheduler -- the §9

Covers: core.threading.test_scheduler

Kind Name Line Description
function test_trivial_two_worker_balance 36
function test_infra_eligibility_restricts_worker 47
function test_no_eligible_worker_raises_naming_the_module 57
function test_no_workers_raises 67
function test_best_schedule_raises_runtime_error_when_prolog_finds_no_solution 72 Direct coverage of _best_schedule's defensive guard: plan_schedule
function test_empty_durations_returns_trivial_feasible_plan 87
function test_conflict_pair_forced_onto_same_worker 92
function test_non_conflicting_pair_may_split 102
function test_budget_infeasible_returns_fallback_plan 112
function test_budget_feasible_returns_true 124
function test_makespan_minimization_beats_naive_round_robin 134
function test_conflicts_ignore_modules_outside_this_run 151 A conflict pair naming a module NOT in durations for this run is
function test_scheduled_plan_is_frozen 165
class TestLoadDurations 171
method TestLoadDurations.test_reads_seconds_as_rounded_milliseconds 172
method TestLoadDurations.test_missing_file_raises_oserror 180
method TestLoadDurations.test_non_object_json_raises_value_error 184
method TestLoadDurations.test_non_numeric_value_raises_value_error 189
method TestLoadDurations.test_negative_value_raises_value_error 196
class TestLoadConflicts 204
method TestLoadConflicts.test_reads_pairs_as_frozensets 205
method TestLoadConflicts.test_missing_file_raises_oserror 213
method TestLoadConflicts.test_non_list_json_raises_value_error 217
method TestLoadConflicts.test_malformed_pair_raises_value_error 222
method TestLoadConflicts.test_self_conflict_raises_value_error 227

tests/core/threading/test_thread_pool.py

source · 26 tests · 316 lines

Covers: core.threading.thread_pool

Kind Name Line Description
function test_submit_and_get_result 47
function test_get_task_record 57
function test_error_handling 72
function test_no_wait_raises_when_pending 88
function test_wait_for_completed_task 101
function test_submit_async_and_wait_async 115
function test_wait_for_task_error_async 125
function test_task_count 134
function test_stop_is_idempotent 143
function test_submit_after_stop_raises 148
function test_get_task_result_unknown_task 154
function test_get_task_unknown_task 159
function test_get_default_thread_pool_singleton 163
function test_legacy_thread_pool_backward_compatibility 169
function test_custom_future_get_directly 177 CustomFuture.get returns the underlying future's result.
function test_get_task_result_no_wait_failed 189
function test_stop_cancel_futures_marks_cancelled 203
function test_get_task_result_cancelled 218
function test_wait_for_task_cancelled 232
function test_wait_future_async_timeout 246
function test_wait_for_task_timeout 257
function test_get_task_result_no_wait_completed 267
function test_wait_for_task_unknown_task 281
function test_wait_future_async_exception_pass 287
function test_wait_for_task_completes_during_wait 298
function test_wait_for_task_fails_during_wait 309

tests/core/threading/test_thread_pool_extended.py

source · 30 tests · 528 lines

Covers: core.threading.thread_pool

Kind Name Line Description
function test_manager_initial_state 54
function test_stop_without_wait 60
function test_stop_without_cancel_futures 67
function test_submit_with_kwargs_only 79
function test_task_returns_none 88
function test_task_returns_complex_object 102
function test_multiple_concurrent_tasks 111
function test_submit_async_with_args 124
function test_single_worker_sequential_execution 138
function test_task_record_has_timestamps 172
function test_get_task_result_wait_on_failed_task 194
function test_traceback_populated_on_failure 209
function test_get_task_result_wait_timeout 232 Cover line 207: TimeoutError after _wait_future_blocking times out.
function test_wait_future_blocking_future_none 244 Cover branch 167->exit: _wait_future_blocking with missing future.
function test_wait_future_async_future_none 250 Cover branch 219->exit: _wait_future_async with missing future.
function test_wait_future_blocking_exception_caught 255 Cover the except Exception path in _wait_future_blocking.
function test_wait_for_task_race_with_stop 272 Verify behavior when stop(cancel_futures=True) races with wait_for_task.
function test_wait_for_task_already_completed 318
function test_wait_for_task_already_failed 332
function test_get_task_result_no_wait_on_cancelled 344
function test_legacy_thread_pool_multiple_tasks 362
function test_legacy_custom_future_exception 377
function test_legacy_task_no_args 388
function test_thread_pool_task_status_enum_values 411
function test_thread_pool_task_dataclass_defaults 419
function test_wait_future_blocking_on_completed_task 445
function test_wait_future_async_on_completed_task 457
function test_wait_for_task_fallback_timeout 473 Cover line 260: defensive TimeoutError when future is missing.
function test_rapid_submit_and_wait 499
function test_rapid_async_submit_and_wait 517