The validity can't be tested using the built-in validator since that one checks if there are no settings that 'override' non-existing settings. And some of the settings overridden in an extruder are not in the inheritance stack since fdmextruder doesn't inherit from fdmprinter.
We'll check though that all settings that are overridden don't override a default_value while there is a value, and whether they don't have IDs.
This makes a few things slightly simpler as well since it now parameterises the tests with the entire path of the definition file so we don't have to reconstruct that in every test.
When going through the list of tests for many printers to fix them, it's then easier to go through the failed list. They will appear in the same order as in my IDE. Just a bit of an ease of life thing without any real cost.
Done during Turbo Testing & Tooling.
Turns out that the JSON objects extend from dict, so this works.
Also turns out that strings have a __getitem__. Who knew?
Done during Turbo Testing & Tooling.
This should not be done anywhere since the default_value won't have any effect then. We disregard CuraEngine's command line method here but that's infeasible with those profiles anyway.
Done during Turbo Testing & Tooling.
Because it now fails at the assertion inside assertIsDefinitionValid, it'll show the information at that point in the stack, rather than showing that the entire function returned False which could be a lot of things (if you don't actually go reading the function because then you discovered that it could only be one thing).