tests.test_actions module¶
Tests for repomatic.github.actions run cancellation and report labels.
- tests.test_actions.test_cancel_superseded_runs_empty_listing()¶
No live runs means no cancellation calls and a zero count.
- tests.test_actions.test_cancel_superseded_runs_queries_both_statuses()¶
Both the in-progress and queued listings are swept, paginated.
- tests.test_actions.test_cancel_superseded_runs_reads_titles_from_the_listing()¶
The listing asks for the display title, tab-separated from the ID.
- tests.test_actions.test_cancel_superseded_runs_spares_current_run()¶
Every listed run is cancelled except the caller’s own.
- tests.test_actions.test_cancel_superseded_runs_spares_release_runs()¶
A run publishing a release survives the sweep.
Nothing else protects it: this sweep enters no concurrency group, so the
cancel-in-progressgate every workflow carries never fires for it, and a cancelled release matrix costs that version its binaries for good.
- tests.test_actions.test_cancel_superseded_runs_tolerates_cancel_failure()¶
A run that fails to cancel is skipped without aborting the sweep.
- tests.test_actions.test_emit_report_keeps_scalar_outputs_out_of_markdown(tmp_path)¶
A markdown report is the report alone.
- tests.test_actions.test_emit_report_writes_scalar_outputs_beside_the_path(tmp_path, monkeypatch)¶
Every output of the step lands in the one write the output file gets.
- tests.test_actions.test_event_subject_readers_agree(event, is_pr, author, number)¶
All three payload readers resolve the same subject node.
- tests.test_actions.test_file_output_round_trips(tmp_path, monkeypatch)¶
What the producer spills is what the consumer reads back.
- tests.test_actions.test_format_file_output_keeps_oversized_values_whole(tmp_path, monkeypatch)¶
A report past the environment’s ceiling reaches the consumer intact.
- tests.test_actions.test_format_file_output_names_the_output_after_the_file(tmp_path, monkeypatch)¶
The step output carries a path under a
_filename, not the content.
- tests.test_actions.test_format_multiline_output_keeps_small_values_verbatim(value)¶
Anything under the ceiling reaches the consuming step untouched.
- tests.test_actions.test_format_multiline_output_leaves_room_for_the_variable_name()¶
The trimmed value plus a
NAME=prefix stays underMAX_ARG_STRLEN.The kernel counts the whole
NAME=valuestring against its per-string cap, so a value sized to the cap exactly would still fail to exec.
- tests.test_actions.test_format_multiline_output_trims_oversized_values(filler, label)¶
An oversized value is cut down to fit, whatever its encoding costs.
- tests.test_actions.test_read_file_output_falls_back_to_the_inline_value(inline, expected, monkeypatch)¶
Without a path it reads the plain variable, and empty when unset.
- tests.test_actions.test_read_file_output_prefers_the_file_over_the_inline_value(tmp_path, monkeypatch)¶
Both variables set means the workflow has moved on: the path wins.
- tests.test_actions.test_report_action_label(action, expected)¶
Each action carries its own emoji-and-label string as its value.
- tests.test_actions.test_report_action_labels_are_distinct()¶
No two actions render the same cell, which would make a report unreadable.
- tests.test_actions.test_trim_to_byte_budget_cuts_on_line_boundaries()¶
A budget landing mid-line drops that line rather than splitting it.
- tests.test_actions.test_trim_to_byte_budget_returns_empty_when_nothing_fits()¶
A budget too small for even the first line yields nothing.
- tests.test_actions.test_workflow_runs_pages_up_to_the_limit()¶
A limit past one page reads the next page, then stops at the limit.
- tests.test_actions.test_workflow_runs_raises_only_when_strict()¶
A
ghthat cannot run fails a strict read and empties a lenient one.
- tests.test_actions.test_workflow_runs_sends_a_created_filter()¶
The listing names the workflow, the branch, the status and the window.
- tests.test_actions.test_workflow_runs_stops_on_a_short_page()¶
A page shorter than asked is the last one: no further call is made.
- tests.test_actions.test_write_output_file_lands_in_the_runner_temp_dir(tmp_path, monkeypatch)¶
The runner’s own temp dir holds the spill when it exports one.