24 Commits

Author SHA1 Message Date
Ghostkeeper
fde9449358
Add test to ensure that no definitions define new settings
See the documentation of the test.
2021-03-08 16:53:48 +01:00
Jaime van Kessel
0493fb24df
Add extra human readable strings to asserts 2020-10-09 15:08:27 +02:00
Jaime van Kessel
cb657ac45a
Some minor stylechanges in tests 2020-06-19 15:34:13 +02:00
Nino van Hooff
89f0970a88 Remove trailing whitespace from Python files 2020-05-29 14:30:33 +02:00
Nino van Hooff
c2c96faf5f Convert remaining doxygen to rst 2020-05-28 17:13:44 +02:00
Ghostkeeper
f4f990708f
Remove old 'category' metadata
Most of it was incorrect and very inconsistent too. These are not used by our code any more.
2020-04-28 09:27:31 +02:00
Ghostkeeper
a8ccec709f
Add test for spaces in definition IDs
Contributes to issue CURA-7201.
2020-02-07 13:55:24 +01:00
Lipu Fei
d346dd4090 Fix TestDefinitionContainer 2019-11-06 15:43:43 +01:00
Ghostkeeper
c7c6389897
Report on all faulty keys at once instead of crashing on first
This makes it a lot easier to communicate back to users what is going wrong.
2019-11-04 11:50:57 +01:00
Ghostkeeper
1f4c863683
Also assert that the extruder_nr setting matches 2019-11-01 15:08:09 +01:00
Ghostkeeper
069dc6e65d
Add test to see if definition's extruder number matches up
...with its machine definition's metadata.
2019-11-01 14:52:41 +01:00
Ghostkeeper
6e6c510dcd
Test extruders for correctness but not for validity
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.
2019-11-01 14:34:07 +01:00
Ghostkeeper
174b326f57
Also test validity and correctness of extruder definitions
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.
2019-11-01 14:18:35 +01:00
Ghostkeeper
985aac9e60
Assert that there is no ID metadata entry in definition containers 2019-10-22 11:01:16 +02:00
Ghostkeeper
51c3acc654
Document helper functions 2019-10-22 09:56:50 +02:00
Ghostkeeper
15ea29924a
Sort definition files before testing them
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.
2019-10-18 17:02:40 +02:00
Ghostkeeper
1d7ad38db2
Also name which setting has the dysfunctional override
So that it's easier to remove it.

Done during Turbo Testing & Tooling.
2019-10-18 17:00:47 +02:00
Ghostkeeper
76b5f9d37b
Fix testing if JSON elements are mappings
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.
2019-10-18 16:57:57 +02:00
Ghostkeeper
9316df72b3
Add test for overriding default_value while there is a value
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.
2019-10-18 16:45:15 +02:00
Ghostkeeper
65bc29cd4c
Give slightly more information when definition is invalid
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).
2019-05-14 09:08:50 +02:00
Jaime van Kessel
338f9c0052 Add check for platform mesh & texture
It simply checks if the file exists
2019-02-15 14:42:50 +01:00
Jaime van Kessel
face8d4799 Moved logic of isDefinitionvalid to it's own function
This should make it easier in the future to add checks for the extruders as well
2019-02-13 14:11:46 +01:00
Jaime van Kessel
9b76124d11 Ensured that the validateDefinitionContainer checks a single definition per test 2019-02-13 14:02:38 +01:00
Aleksei S
2b45262a85 Added test for definition container
CURA-5977
2018-11-23 17:01:05 +01:00