Add per-order speed and material KPIs
This commit is contained in:
1 parent
211fb45d52
commit
f6ebd78a4a
15 files changed
+773
-30
No files matched your search
@@ -59,6 +59,22 @@ def test_stable_model_required_labels_and_supplied_quantities():
|
||||
assert "12,35 m/min" in content(value)
|
||||
|
||||
|
||||
def test_production_pdf_table_contains_attributed_kpis_as_plain_text():
|
||||
value = report("K7")
|
||||
first = replace(value.production.items[0], production_order="12026001032",
|
||||
average_speed_m_min=10.24, material_consumption_kg=3317.58)
|
||||
second = replace(first, production_order="12026001037",
|
||||
average_speed_m_min=None, material_consumption_kg=0)
|
||||
value = replace(value, production=replace(value.production, items=(first, second)))
|
||||
table = next(block for block in present_report(value)
|
||||
if isinstance(block, TableBlock) and "Ø Geschwindigkeit" in block.headers)
|
||||
assert table.rows[0][-2:] == ("10,24 m/min", "3.317,58 kg")
|
||||
assert table.rows[1][-2:] == ("—", "0,00 kg")
|
||||
assert table.rows[0][0] == "12026001032"
|
||||
assert "Materialverbrauch gesamt: 42,00 kg" in content(value)
|
||||
assert render_pdf(value).startswith(b"%PDF-")
|
||||
|
||||
|
||||
def test_top_three_preserve_order_and_durations():
|
||||
tables = [block for block in present_report(report()) if isinstance(block, TableBlock)]
|
||||
reasons = next(block for block in tables if block.headers == ("Stillstandsgrund", "Dauer"))
|
||||
|
||||
Reference in new issue
Block a user