mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-16 11:17:49 -06:00
Also assert that the extruder_nr setting matches
This commit is contained in:
parent
d145945b25
commit
1f4c863683
1 changed files with 6 additions and 1 deletions
|
@ -169,4 +169,9 @@ def test_extruderMatch(file_path: str):
|
|||
assert "machine_extruder_trains" in machine_doc["metadata"], "Machine must define extruder trains."
|
||||
extruder_trains = machine_doc["metadata"]["machine_extruder_trains"]
|
||||
assert position in extruder_trains, "There must be a reference to the extruder in the machine definition."
|
||||
assert extruder_trains[position] == extruder_id, "The extruder referenced in the machine definition must match up."
|
||||
assert extruder_trains[position] == extruder_id, "The extruder referenced in the machine definition must match up."
|
||||
|
||||
# Also test if the extruder_nr setting is properly overridden.
|
||||
if "overrides" not in doc or "extruder_nr" not in doc["overrides"] or "default_value" not in doc["overrides"]["extruder_nr"]:
|
||||
assert position == "0" # Default to 0 is allowed.
|
||||
assert doc["overrides"]["extruder_nr"]["default_value"] == int(position)
|
Loading…
Add table
Add a link
Reference in a new issue