mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-11 16:57:51 -06:00
Add alternative scenarios for prepareLocals
Contributes to issue CURA-5929.
This commit is contained in:
parent
91e8c177fe
commit
53c9cdc3fe
1 changed files with 51 additions and 1 deletions
|
@ -33,7 +33,7 @@ def test_prepareDefaults(legacy_profile_reader, input):
|
||||||
assert output == {}
|
assert output == {}
|
||||||
|
|
||||||
test_prepareLocalsData = [
|
test_prepareLocalsData = [
|
||||||
(
|
( # Ordinary case.
|
||||||
{ # Parser data.
|
{ # Parser data.
|
||||||
"profile":
|
"profile":
|
||||||
{
|
{
|
||||||
|
@ -47,6 +47,56 @@ test_prepareLocalsData = [
|
||||||
"infill_density": "20",
|
"infill_density": "20",
|
||||||
"line_width": "0.4"
|
"line_width": "0.4"
|
||||||
}
|
}
|
||||||
|
),
|
||||||
|
( # Empty data.
|
||||||
|
{ # Parser data.
|
||||||
|
"profile":
|
||||||
|
{
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"profile", # Config section.
|
||||||
|
{ # Defaults.
|
||||||
|
}
|
||||||
|
),
|
||||||
|
( # All defaults.
|
||||||
|
{ # Parser data.
|
||||||
|
"profile":
|
||||||
|
{
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"profile", # Config section.
|
||||||
|
{ # Defaults.
|
||||||
|
"foo": "bar",
|
||||||
|
"boo": "far"
|
||||||
|
}
|
||||||
|
),
|
||||||
|
( # Multiple config sections.
|
||||||
|
{ # Parser data.
|
||||||
|
"some_other_name":
|
||||||
|
{
|
||||||
|
"foo": "bar"
|
||||||
|
},
|
||||||
|
"profile":
|
||||||
|
{
|
||||||
|
"foo": "baz" #Not the same as in some_other_name
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"profile", # Config section.
|
||||||
|
{ # Defaults.
|
||||||
|
"foo": "bla"
|
||||||
|
}
|
||||||
|
),
|
||||||
|
( # Section does not exist.
|
||||||
|
{ # Parser data.
|
||||||
|
"some_other_name":
|
||||||
|
{
|
||||||
|
"foo": "bar"
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"profile", # Config section.
|
||||||
|
{ # Defaults.
|
||||||
|
"foo": "baz"
|
||||||
|
}
|
||||||
)
|
)
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue