Commit graph

254 commits

Author SHA1 Message Date
Lipu Fei
34c080c4bd Add _trustHook() to MockContainer
CURA-6856
2019-11-07 09:55:44 +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
5ae248341b
Add test for getting quality groups from the container tree
Finally it works.

Done during turbo testing and tooling.
2019-10-04 15:35:33 +02:00
Ghostkeeper
557746a832
Partial fix for intent manager not finding correct profile in test
Only in test.
2019-09-23 15:17:15 +02:00
Jaime van Kessel
3a2c5b2473
Fix test for stack builder 2019-09-23 13:26:21 +02:00
Ghostkeeper
61527e082e
Mock ContainerTree instead of ContainerRegistry
The intent models are now using the ContainerTree to build themselves rather than the registry.
2019-09-23 09:59:57 +02:00
Diego Prado Gesto
b18565d9cf Merge branch 'master' into feature_intent_container_tree 2019-09-10 11:08:21 +02:00
Lipu Fei
dba3b77f61 Fix tests
CURA-6598
2019-09-09 16:45:39 +02:00
Jaime van Kessel
f540abbd73
Expand the createUniqueName test 2019-09-06 15:13:25 +02:00
Jaime van Kessel
d9e94f5019 Fix tests 2019-08-29 17:07:36 +02:00
Jaime van Kessel
784ab6e903 Add missing isDirty function
CURA-6600
2019-08-29 16:36:11 +02:00
Remco Burema
7fb9642e45 Replace deprecated .getContainer() calls with .container
part of CURA-6600
2019-08-15 13:40:08 +02:00
Ghostkeeper
6a5f425468
Fix running tests via CMake
The Settings folder conflicts with the same folder in Uranium, so it couldn't find MockContainer from the Uranium version.

Contributes to issue CURA-6600.
2019-08-13 16:20:21 +02:00
Ghostkeeper
6a8e1557c3
Merge branch 'feature_intent' into feature_intent_container_tree
Conflicts:
	.gitlab-ci.yml
	cura/Machines/MaterialManager.py
	cura/Machines/VariantManager.py
	cura/Settings/ContainerManager.py
	cura/Settings/MachineManager.py
	tests/TestMachineManager.py
2019-08-13 14:59:05 +02:00
Ghostkeeper
20201c65e6
Merge branch 'master' into feature_intent
Conflicts:
	resources/bundled_packages/cura.json -> 4.1 to 4.2 upgrade package added simultaneously
	tests/TestMachineManager.py -> Due to changes in conftest.py
	tests/conftest.py -> Simultaneously expanding the magic mocks to have some correct properties
2019-08-13 14:43:28 +02:00
Jaime van Kessel
e08feb1099 Fix final set of broken tests
CURA-6600
2019-08-12 16:32:59 +02:00
Jaime van Kessel
e18820b846 Fix tests for ContainerManager
CURA-6600
2019-08-12 15:37:19 +02:00
Jaime van Kessel
1103df0cc9 Add test for _getIOPlugins 2019-08-02 14:38:39 +02:00
Jaime van Kessel
c7ab1a9f5d Add tests for _isMetadataValid 2019-08-02 14:30:37 +02:00
Jaime van Kessel
d69c4d0979 Fix tests
CURA-6543
2019-06-03 16:27:39 +02:00
Jaime van Kessel
92dc99a4d5 Add a number of tests for settingInheritanceManager 2019-05-31 14:54:34 +02:00
Jaime van Kessel
14d5fa5529 Add a bunch of tests for importing profiles 2019-05-31 13:59:54 +02:00
Jaime van Kessel
1d4fe56a21 Add tests for _findProfileWriter 2019-05-31 13:18:14 +02:00
Jaime van Kessel
43360aace0 Add tests for ExportQualityProfile 2019-05-31 13:07:03 +02:00
Jaime van Kessel
31f53dfc3c Add tests for SettingOverrideDecorator
CURA-6539
2019-05-28 11:22:13 +02:00
Jaime van Kessel
3748b256ce Add a few more simple tests for extruder stack 2019-05-24 17:28:42 +02:00
Jaime van Kessel
879dc90246 Add test for creating extruder stack 2019-05-24 16:42:20 +02:00
Jaime van Kessel
76163636a1 Fix the simple create machine test 2019-05-24 16:36:39 +02:00
Jaime van Kessel
c1818bcfbe Add test for CuraStackBuilder 2019-05-20 08:57:58 +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
d0e61f23f1 Add test for exporting container by means of the containerManager 2019-03-15 17:02:06 +01:00
Jaime van Kessel
fd237a9473 Add test that checks the validity of the namefilters 2019-03-15 16:34:17 +01:00
Jaime van Kessel
7bb35cdbf7 Add test cases for the ContainerManager 2019-03-15 16:17:28 +01:00
Ghostkeeper
2b8a2d0c20
Reduce print output during happy path of automated tests
It should really just not print anything except what pytest prints, so you can easily see what tests have failed and what have not.
2019-03-11 11:10:09 +01:00
Jaime van Kessel
0616601250 Merge branch '4.0' of github.com:Ultimaker/Cura 2019-03-11 10:39:23 +01:00
Ghostkeeper
e53eb70cad
Add tests for validating metadata before loading
Contributes to issue CURA-6270.
2019-03-08 14:07:10 +01:00
Jaime van Kessel
efeba48ffb Move initializeSettingDefinitions and setting functions to their own function
This means we don't have to instantiate CuraApplication in the tests anymore
2019-02-18 09:45:30 +01: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
c3b447cd89 Also check if the variants are correct 2019-02-15 14:20:13 +01:00