autowisp.tests.test_error_render module

Class Inheritance Diagram

Inheritance diagram of Error, FileKind, Image, PipelineError, RelatedFile, StackToMasterError, TestErrorCounts, TestErrorDetail, TestErrorListRows, TestErrorSummary, TestFormatDetailText, ViewError, _RenderTestCase, datetime, timezone

Unit tests for error rendering (the shared formatter).

Renders persisted Error rows (written via persist_error) through error_render; uses a throwaway project database.

class autowisp.tests.test_error_render.TestErrorCounts(methodName='runTest')[source]

Bases: TestCase

Inheritance diagram of autowisp.tests.test_error_render.TestErrorCounts

error_count / error_counts_by_step / the step filter.

Fresh project per test, since these assert exact counts.

setUp()[source]

Hook method for setting up the test fixture before exercising it.

test_counts_by_step_excludes_stepless()[source]

Per-step counts group step errors and skip pipeline/BUI ones.

test_counts_exclude_resolved()[source]

Resolving an error drops it from the badge and step markers.

test_gate_always_includes_pipeline_errors()[source]

A pipeline error gates any launch, even unrelated steps.

test_gate_excludes_bui_errors()[source]

BUI errors do not gate processing.

test_gate_excludes_resolved()[source]

Resolving an error removes it from the gate.

test_gate_scopes_step_errors_to_selected_steps()[source]

Step errors gate only their own step.

test_list_shows_resolved_open_first()[source]

The list keeps resolved errors (annotated), open ones first.

test_step_filter_on_list_rows()[source]

error_list_rows(step_name=…) restricts to that step.

test_total_count()[source]

error_count totals every recorded error, any component.

class autowisp.tests.test_error_render.TestErrorDetail(methodName='runTest')[source]

Bases: _RenderTestCase

Inheritance diagram of autowisp.tests.test_error_render.TestErrorDetail

error_detail: user vs developer views, remediation, degradation.

test_developer_view_adds_sidecar_backed_fields()[source]

developer=True adds message/traceback/details and provenance.

test_missing_sidecar_degrades()[source]

With no sidecar, developer fields are present but empty/flagged.

test_remediation_only_when_present()[source]

Remediation appears iff the error provided one in details.

test_user_view_omits_technical_fields()[source]

developer=False shows user fields, hides traceback/details.

class autowisp.tests.test_error_render.TestErrorListRows(methodName='runTest')[source]

Bases: _RenderTestCase

Inheritance diagram of autowisp.tests.test_error_render.TestErrorListRows

error_list_rows: the cheap, inline-only list-view projection.

test_does_not_read_sidecars()[source]

The list projection never opens a sidecar file.

test_rows_newest_first_with_summary_fields()[source]

Returns one dict per error, newest first, with summary fields.

class autowisp.tests.test_error_render.TestErrorSummary(methodName='runTest')[source]

Bases: _RenderTestCase

Inheritance diagram of autowisp.tests.test_error_render.TestErrorSummary

error_summary: one-line component/step/artifact/message.

test_summary_with_artifact()[source]

A resolved image FK appears in the summary.

test_summary_without_artifact()[source]

No linked artifact -> component:step + message only.

class autowisp.tests.test_error_render.TestFormatDetailText(methodName='runTest')[source]

Bases: _RenderTestCase

Inheritance diagram of autowisp.tests.test_error_render.TestFormatDetailText

format_detail_text: terminal rendering of the detail dict.

test_developer_text_includes_traceback()[source]

The developer view text includes the traceback block.

test_user_text_is_summary_plus_remediation()[source]

The user view text shows the summary and (any) remediation.

class autowisp.tests.test_error_render._RenderTestCase(methodName='runTest')[source]

Bases: TestCase

Base creating one throwaway project database for the class.

classmethod setUpClass()[source]

Hook method for setting up class fixture before running tests in the class.

classmethod tearDownClass()[source]

Hook method for deconstructing the class fixture after running all tests in the class.