ci(config): normalize legacy semicolon inline comments when comparing inherited defaults
This commit is contained in:
1 parent
a4b9bea7d8
commit
b05b52c7ae
1 file changed
+5
-2
@@ -96,8 +96,11 @@ for section in (
|
||||
"JsonStore", "OGLShutdown"):
|
||||
for key in defaults.options(section):
|
||||
if sim.has_option(section, key):
|
||||
assert sim.get(section, key).strip().lower() == (
|
||||
defaults.get(section, key).strip().lower()
|
||||
# Legacy OpenSimDefaults.ini uses semicolon inline comments for
|
||||
# some settings. Normalize those while comparing actual values.
|
||||
effective = lambda value: value.partition(";")[0].strip().strip('"').lower()
|
||||
assert effective(sim.get(section, key)) == effective(
|
||||
defaults.get(section, key)
|
||||
), f"Unexpected default override: [{section}] {key}"
|
||||
|
||||
assert sim.get("Startup", "physics") == "BulletSim"
|
||||
|
||||
Reference in new issue
Block a user