mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-17 11:47:50 -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
|
@ -170,3 +170,8 @@ def test_extruderMatch(file_path: str):
|
||||||
extruder_trains = machine_doc["metadata"]["machine_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 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