64 Commits

Author SHA1 Message Date
Jelle Spijker
70873ff2df
Fix UT Materials brand is a required property 2023-09-13 11:18:16 +02:00
Casper Lamboo
f73154a2c5
Use camelCase for python function definition
CURA-10599

Co-authored-by: Jaime van Kessel <nallath@gmail.com>
2023-06-12 14:35:11 +02:00
c.lamboo
da33a26dc4 Fix unit tests
CURA-10599
2023-06-12 13:33:59 +02:00
luz paz
d68f375e38 Fix various typos
Found via `codespell -q 3 -S *.po,*.pot -L childs,initialy,lod,ned,te,slicable,sur,tutoriels,wont`
2021-09-07 11:33:54 -04: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
Kostas Karmas
1e2764278e Remove unnecessary os.path.basename call 2020-05-08 16:58:33 +02:00
Kostas Karmas
856bd86cd1 Add test for platform mesh sizes <=1MB
As a result of Cura and Cookies discussion, we decided to limit the
sizes of platform meshes to less than 1MB. This test checks that
during the CI/CD process and displays an assertion error when a
mesh excludes this limit.
2020-05-08 16:51:13 +02:00
Kostas Karmas
07fcdf905e Add tests for the DiscoveredCloudPrintersModel
CURA-7022
2020-04-29 15:02:26 +02:00
Jaime van Kessel
2e9dca71ce
Remove a number of unused imports 2020-04-10 13:58:10 +02:00
Jaime van Kessel
0862fd493e
Fix some tests not cleaning up correctly after themselves
The PrintInformation test wasn't cleaning up after itself correclty. This
left some stuff behind that the other tests were using. Since this is bad (as at that point
tests can influence other tests), i've fixed that
2019-12-24 16:20:09 +01:00
Lipu Fei
d70a6e81b1 Merge 4.4 2019-11-12 14:39:30 +01:00
Lipu Fei
77c194464e Fix tests 2019-11-12 14:33:54 +01:00
Ghostkeeper
852da51f65
Fix tests for exact matching on preferred material
I don't know why the CI system was only complaining about it several commits later. Could be troublesome.

Fixes a bug introduced by 1284d9fe8d726e46b556caa8f2f390dc7d65220c.
2019-11-01 13:56:29 +01:00
Ghostkeeper
94eb76a844
Merge branch 'master' into CURA-6793_performance
Conflicts:
	cura/Machines/MaterialManager.py -> File was deleted in Master but I changed things for the lazy loading.
	cura/Machines/Models/BaseMaterialsModel.py -> I clarified documentation on a line above a place where a timer was added in between.

Contributes to issue CURA-6793.
2019-10-23 09:58:08 +02:00
Lipu Fei
f2c66f8d3a Fix TestVariantNode
CURA-6921
2019-10-22 15:31:17 +02:00
Ghostkeeper
c12817170c
Merge branch 'master' into CURA-6793_performance 2019-10-16 15:47:41 +02:00
Ghostkeeper
8179dfc412
Make cache of machines a protected field
We don't want to use it outside of the mapping. This mapping should be transparent.
We are still using it from our tests though but that's fine. Tests are allowed to touch private fields.

Contributes to issue CURA-6793.
2019-10-16 15:04:07 +02:00
Ghostkeeper
5624f0a8ae
Fix tests with new lazy-loading technique
The new lazy loading requests different functions from the registry so we need to mock that out.
Also fix the manual insertion of things into the lazy-loaded mapping.

Contributes to issue CURA-6793.
2019-10-16 14:59:46 +02:00
Lipu Fei
84080b675b Fix tests 2019-10-15 08:29:53 +02:00
Ghostkeeper
22d874d932
Code style
Found during work on CURA-6973.
2019-10-10 16:02:47 +02:00
Ghostkeeper
862504f603
Add test for preferring a material diameter over the preferred from metadata
Done during Turbo Testing and Tooling.
2019-10-04 17:32:42 +02:00
Ghostkeeper
9b6443c2d3
Add test for preferred material diameter mismatch
Done during Turbo Testing and Tooling.
2019-10-04 17:28:27 +02:00
Ghostkeeper
93e397a0cc
Move creation of empty variant nodes to fixture
Done during Turbo Testing and Tooling.
2019-10-04 17:23:14 +02:00
Ghostkeeper
30e268e975
Add test for preferred material's diameter check
Done during Turbo Testing and Tooling.
2019-10-04 17:16:59 +02:00
Ghostkeeper
54fcb38fe6
Add test for preferred material matching on submaterials
Done during Turbo Testing and Tooling.
2019-10-04 17:11:32 +02:00
Ghostkeeper
a117e937b9
Add test for preferred material with the happy flow
The exact preferred material is available. Pick that.
2019-10-04 17:07:45 +02:00
Ghostkeeper
2671f12c21
Add test for is_available on resulting quality groups
Done during Turbo Testing and Tooling.
2019-10-04 15:35:33 +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
Lipu Fei
e5c59b1308 Fix TestVariantNode 2019-10-04 11:00:01 +02:00
Lipu Fei
7233bdb255 Fix TestMachineNode: remove invalid property has_machine_materials 2019-10-04 10:37:45 +02:00
Ghostkeeper
b245be6970
Remove has_machine_materials metadata
It's not behaving as expected here. For instance, Ultimaker 3 wasn't specifying has_machine_materials and thus only the base materials would get loaded, but clearly the Ultimaker 3 has materials specialised for it.
Whether or not a printer has materials specialised for it is now determined by whether the specialisations exist in the material files. So we don't need the metadata entry any more. It seemed to have not been in use anyway, except by one printer which specified that has_machine_materials is true. I've now made it behave as if it's always true.

Contributes to issue CURA-6831.
2019-10-02 08:55:04 +02:00
Ghostkeeper
45f3b6eeb2
Simplify quality node intents list test
Not a whole lot of mocking.
I also added a lot of extra instance containers that should NOT match.

Added during testing & tooling.
2019-09-27 16:04:49 +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
Ghostkeeper
f1299589c9
Remove debug prints
Contributes to issue CURA-6600.
2019-09-12 15:49:27 +02:00
Lipu Fei
3f3aac7ce5
Merge pull request #6289 from Ultimaker/feature_intent_interface
Feature intent interface
2019-09-09 16:53:37 +02:00
Ghostkeeper
5debdd4cf6
Fix getting extruder list everywhere
Didn't test this beyond my own automated test, it seems.

Contributes to issue CURA-6600.
2019-09-09 16:47:29 +02:00
Ghostkeeper
178887d8e5
Add test for getting metadata from machine node
Contributes to issue CURA-6600.
2019-09-06 17:40:31 +02:00
Ghostkeeper
5106d3b7c1
Test if we actually return the result of the call to getQuality[Changes]Groups
Contributes to issue CURA-6600.
2019-09-06 17:26:38 +02:00
Ghostkeeper
7f192ce36f
Add test for getting current quality changes groups
Similar to getting the current quality groups.

Contributes to issue CURA-6600.
2019-09-06 17:25:07 +02:00
Ghostkeeper
ea5530c507
Add test for getting quality changes groups without global stack
Shouldn't crash. Instead it should give no quality changes groups.

Contributes to issue CURA-6600.
2019-09-06 17:21:56 +02:00
Ghostkeeper
4bdc819f12
Fix nondetermistic result with dictionary values list
Because global_stack.extruders.values can be returned in any order, the configurations matching with the lists doesn't always give a result.
It happened to work on my computer with the test, but there is no guarantee of that.

This is probably also going wrong in other places. I don't think we should use the .extruders property anywhere really!

Contributes to issue CURA-6600.
2019-09-06 17:15:45 +02:00
Ghostkeeper
d618f2df71
Add test for getCurrentQualityGroups
The test succeeded but in writing it I discovered a bug. I'll fix that soon.

Contributes to issue CURA-6600.
2019-09-06 17:06:32 +02:00
Ghostkeeper
10f37c98ff
Add test for getCurrentQualityGroups if there is no current printer
Contributes to issue CURA-6600.
2019-09-02 13:35:17 +02:00
Jaime van Kessel
001c2ec753 Fix test 2019-08-29 17:09:31 +02:00
Jaime van Kessel
d9e94f5019 Fix tests 2019-08-29 17:07:36 +02:00
Jaime van Kessel
f6ccd40f9f Add tests for metadatachanged
CURA-6600
2019-08-21 15:18:57 +02:00
Jaime van Kessel
25ea1dd66a Add tests for the _onRemoved handler
CURA-6600
2019-08-21 14:45:59 +02:00
Jaime van Kessel
a6be5ac52d Fix materialNode tests
CURA-6600
2019-08-21 12:50:40 +02:00
Ghostkeeper
80baeb9873
Remove _added functions for nodes that can't be added during runtime
Among the machines, variants, materials, qualities and intents, only machines and materials can ever be added during runtime. For the rest, we don't need to listen to these signals.

Contributes to issue CURA-6600.
2019-08-16 16:28:42 +02:00