Grotti 3.4.0: Dateien umbenennen, Bedarf/PLA-Match, Pause- und gklib-Fixes.
This commit is contained in:
1 parent
67a89d1794
commit
dd0e7ebc6b
16 files changed
+430
-58
No files matched your search
@@ -63,6 +63,30 @@ class BedarfTests(unittest.TestCase):
|
||||
out = compute(conn)
|
||||
self.assertEqual(out["shortfall"], [])
|
||||
|
||||
def test_slicer_hex_matches_named_stock(self):
|
||||
"""Slice #26A69A vs. Spule „Grau“ — 1 kg reicht, kein Fehlalarm."""
|
||||
conn = MagicMock()
|
||||
conn.execute.side_effect = self._rows(
|
||||
[
|
||||
{
|
||||
"id": 1,
|
||||
"spool_id": None,
|
||||
"repeat_total": 1,
|
||||
"repeat_done": 0,
|
||||
"weight_g": 49.23,
|
||||
"filaments": [{"type": "PLA", "color": "#26A69A"}],
|
||||
"spool_material": None,
|
||||
"spool_color": None,
|
||||
},
|
||||
],
|
||||
[
|
||||
{"material_type": "PLA", "color": "Grau", "remaining_g": 1000.0},
|
||||
],
|
||||
)
|
||||
out = compute(conn)
|
||||
self.assertEqual(out["shortfall"], [])
|
||||
self.assertAlmostEqual(out["needed"][0]["weight_g"], 49.23)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
Reference in new issue
Block a user