mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-11 00:29:02 +08:00
Add alternative scenarios for prepareLocals
Contributes to issue CURA-5929.
This commit is contained in:
parent
91e8c177fe
commit
53c9cdc3fe
@ -33,7 +33,7 @@ def test_prepareDefaults(legacy_profile_reader, input):
|
||||
assert output == {}
|
||||
|
||||
test_prepareLocalsData = [
|
||||
(
|
||||
( # Ordinary case.
|
||||
{ # Parser data.
|
||||
"profile":
|
||||
{
|
||||
@ -47,6 +47,56 @@ test_prepareLocalsData = [
|
||||
"infill_density": "20",
|
||||
"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…
x
Reference in New Issue
Block a user