tests.test_images moduleΒΆ
Tests for image optimization utilities.
- tests.test_images.test_optimization_result_saved_bytes()[source]ΒΆ
Saved bytes is the difference between before and after.
- Return type:
- tests.test_images.test_optimization_result_saved_pct()[source]ΒΆ
Saved percentage is computed from before/after.
- Return type:
- tests.test_images.test_optimization_result_zero_before()[source]ΒΆ
Zero-byte file produces 0% savings.
- Return type:
- tests.test_images.test_generate_markdown_summary_empty()[source]ΒΆ
Empty results produce a simple message.
- Return type:
- tests.test_images.test_generate_markdown_summary_single_result()[source]ΒΆ
Summary table with a single result.
Column padding is the rendererβs business, so the header is matched on its cells rather than on an exact line.
- Return type:
- tests.test_images.test_generate_markdown_summary_multiple_results()[source]ΒΆ
Summary table with multiple results shows totals.
- Return type:
- tests.test_images.test_optimize_image_missing_tool(tmp_path)[source]ΒΆ
Returns None when the required tool is not on $PATH.
- Return type:
- tests.test_images.test_optimize_image_zero_byte_file(tmp_path)[source]ΒΆ
Returns None for empty files.
- Return type:
- tests.test_images.test_optimize_image_unsupported_extension(tmp_path)[source]ΒΆ
Returns None for unsupported file extensions.
- Return type:
- tests.test_images.test_optimize_image_below_threshold(tmp_path)[source]ΒΆ
Restores original when savings are below threshold.
- Return type:
- tests.test_images.test_optimize_image_below_bytes_threshold(tmp_path)[source]ΒΆ
Restores original when absolute byte savings are below threshold.
- Return type: