← Về thư mục
tests/pdf/test_scripts.py
- coords · function · L35-L39 — def coords()
- ImageToPdfTransformTests · class · L42-L87 — class ImageToPdfTransformTests(unittest.TestCase)
- test_a_box_at_the_image_origin_lands_at_the_pdf_top · method · L45-L55 — def test_a_box_at_the_image_origin_lands_at_the_pdf_top(self) -> None: # Image (0,0)-(100,50) on a 1000x500 image over a 200x100 page: # x scales by 0.2, y flips -> top of the page.
- test_a_box_at_the_image_bottom_lands_at_the_pdf_origin · method · L57-L63 — def test_a_box_at_the_image_bottom_lands_at_the_pdf_origin(self) -> None
- test_identity_scaling_only_flips_the_y_axis · method · L65-L73 — def test_identity_scaling_only_flips_the_y_axis(self) -> None
- test_the_box_keeps_its_size_under_a_pure_flip · method · L75-L80 — def test_the_box_keeps_its_size_under_a_pure_flip(self) -> None
- test_the_transform_is_invertible_within_rounding · method · L82-L87 — def test_the_transform_is_invertible_within_rounding(self) -> None
- PdfCoordinateTests · class · L90-L110 — class PdfCoordinateTests(unittest.TestCase)
- test_the_y_axis_is_flipped_about_the_page_height · method · L91-L98 — def test_the_y_axis_is_flipped_about_the_page_height(self) -> None
- test_flipping_twice_returns_the_original · method · L100-L105 — def test_flipping_twice_returns_the_original(self) -> None
- test_a_box_spanning_the_full_page_is_unchanged_vertically · method · L107-L110 — def test_a_box_spanning_the_full_page_is_unchanged_vertically(self) -> None
- field · function · L113-L119 — def field(description: str, label: list, entry: list, page: int = 1) -> dict
- BoundingBoxCheckTests · class · L122-L190 — class BoundingBoxCheckTests(unittest.TestCase)
- _messages · method · L125-L130 — def _messages(self, *fields) -> list[str]
- _failures · method · L132-L133 — def _failures(self, *fields) -> list[str]
- test_a_clean_layout_reports_only_the_field_count · method · L135-L142 — def test_a_clean_layout_reports_only_the_field_count(self) -> None
- test_an_empty_form_reports_zero_fields · method · L144-L147 — def test_an_empty_form_reports_zero_fields(self) -> None
- test_a_label_overlapping_its_own_entry_is_reported · method · L149-L155 — def test_a_label_overlapping_its_own_entry_is_reported(self) -> None
- test_two_fields_overlapping_each_other_are_reported · method · L157-L165 — def test_two_fields_overlapping_each_other_are_reported(self) -> None
- test_boxes_on_different_pages_never_collide · method · L167-L174 — def test_boxes_on_different_pages_never_collide(self) -> None
- test_boxes_that_merely_touch_do_not_count_as_intersecting · method · L176-L180 — def test_boxes_that_merely_touch_do_not_count_as_intersecting(self) -> None: # Edge-sharing is how adjacent fields are normally laid out.
- test_the_report_stops_after_twenty_messages · method · L182-L190 — def test_the_report_stops_after_twenty_messages(self) -> None: # A form where everything overlaps would otherwise produce thousands.
- FieldDescriptorTests · class · L193-L234 — class FieldDescriptorTests(unittest.TestCase)
- _descriptor · method · L196-L200 — def _descriptor(self, raw: dict, field_id: str = "full_name") -> dict
- test_a_text_field_is_typed_as_text · method · L202-L205 — def test_a_text_field_is_typed_as_text(self) -> None
- test_a_checkbox_learns_its_checked_and_unchecked_values · method · L207-L213 — def test_a_checkbox_learns_its_checked_and_unchecked_values(self) -> None
- test_the_state_order_does_not_decide_which_value_means_checked · method · L215-L219 — def test_the_state_order_does_not_decide_which_value_means_checked(self) -> None: # "/Off" is the unchecked state wherever it appears in the list.
- test_a_choice_field_carries_its_options · method · L221-L229 — def test_a_choice_field_carries_its_options(self) -> None
- test_an_unrecognised_field_type_is_labelled_rather_than_dropped · method · L231-L234 — def test_an_unrecognised_field_type_is_labelled_rather_than_dropped(self) -> None
- ValueValidationTests · class · L237-L283 — class ValueValidationTests(unittest.TestCase)
- _error · method · L238-L242 — def _error(self, field_info, value)
- test_a_checkbox_accepts_only_its_two_declared_states · method · L251-L258 — def test_a_checkbox_accepts_only_its_two_declared_states(self) -> None
- test_a_choice_field_accepts_only_its_option_values · method · L260-L268 — def test_a_choice_field_accepts_only_its_option_values(self) -> None
- test_a_radio_group_accepts_only_its_option_values · method · L270-L277 — def test_a_radio_group_accepts_only_its_option_values(self) -> None
- test_a_text_field_accepts_any_string · method · L279-L283 — def test_a_text_field_accepts_any_string(self) -> None