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
@@ -17,6 +17,12 @@ class ProfileMatchTests(unittest.TestCase):
|
||||
def test_empty_profile_always_ok(self):
|
||||
self.assertTrue(store._profile_matches("", "Sunlu PLA Meta"))
|
||||
|
||||
def test_base_profile_helpers(self):
|
||||
self.assertFalse(store._profile_has_variant("Sunlu PLA"))
|
||||
self.assertTrue(store._profile_has_variant("Sunlu PLA Meta"))
|
||||
self.assertEqual(store._profile_base_type("Sunlu PLA"), "pla")
|
||||
self.assertEqual(store._profile_base_type("Generic PETG"), "petg")
|
||||
|
||||
|
||||
class MatchSpoolsTests(unittest.TestCase):
|
||||
def setUp(self):
|
||||
@@ -37,8 +43,22 @@ class MatchSpoolsTests(unittest.TestCase):
|
||||
"material_name": "sunlu pla matte",
|
||||
"ace_slot": 2,
|
||||
},
|
||||
{
|
||||
"spool_id": 3,
|
||||
"material_type": "pla",
|
||||
"color": "",
|
||||
"remaining_g": 900,
|
||||
"material_name": "eryone pla",
|
||||
"ace_slot": None,
|
||||
},
|
||||
]
|
||||
|
||||
def test_base_sunlu_pla_matches_plain_pla_not_meta(self):
|
||||
need = {"profile": "Sunlu PLA", "material_type": "pla", "color": "", "paint_index": 0}
|
||||
matched = store._match_spools_for_need(need, self.have)
|
||||
ids = {m["spool_id"] for m in matched}
|
||||
self.assertEqual(ids, {3}) # Eryone PLA; Meta/Matte nicht
|
||||
|
||||
def test_picks_meta_not_matte(self):
|
||||
need = {"profile": "Sunlu PLA Meta", "material_type": "pla", "color": "", "paint_index": 0}
|
||||
matched = store._match_spools_for_need(need, self.have)
|
||||
|
||||
Reference in new issue
Block a user