615 Commits

Author SHA1 Message Date
Ghostkeeper
df2ae12ca9
Add tests for deserialising extruders with variants
Contributes to issue CURA-3497.
2017-03-24 17:21:47 +01:00
Ghostkeeper
bbd0ca7b9f
Add tests for deserialising extruders with material
Contributes to issue CURA-3497.
2017-03-24 17:17:41 +01:00
Ghostkeeper
9cb7c30fcb
Add tests for deserialising extruders with quality
Only the greatest extruders with actual quality are deserialised...

Contributes to issue CURA-3497.
2017-03-24 17:13:32 +01:00
Ghostkeeper
71a946d1b9
Add tests for deserialising extruders with quality changes
Contributes to issue CURA-3497.
2017-03-24 17:08:34 +01:00
Ghostkeeper
91814a827b
Line up parameters of test cases
Better oversight.

Contributes to issue CURA-3497.
2017-03-24 17:05:06 +01:00
Ghostkeeper
73326ae53d
Extruders don't have definition changes
So remove them from our test extruder stacks.

Contributes to issue CURA-3497.
2017-03-24 17:03:29 +01:00
Ghostkeeper
dea86ca535
Add tests for deserialising a stack with user changes
Code is mostly copied over from the global stack, which should work in a similar way.

Contributes to issue CURA-3497.
2017-03-24 16:57:48 +01:00
Ghostkeeper
e881465050
Add delimiter between global stuff and test cases
Helps provide some oversight since this module is about to explode in size.

Contributes to issue CURA-3497.
2017-03-24 16:31:57 +01:00
Ghostkeeper
14ac41e58f
Add tests for setQualityChangesById
One for when the ID exists, one for when it doesn't exist.

Contributes to issue CURA-3497.
2017-03-24 16:24:27 +01:00
Ghostkeeper
498956a190
Add tests for setQualityById
One for when the ID exists, one for when it doesn't exist.

Contributes to issue CURA-3497.
2017-03-24 16:19:47 +01:00
Ghostkeeper
d9ba848dc8
Add tests for setMeterialById
One for when the ID exists, one for when it doesn't exist.

Contributes to issue CURA-3497.
2017-03-24 16:15:50 +01:00
Ghostkeeper
3e437074ae
Sort tests better
Alphabetically.

Contributes to issue CURA-3497.
2017-03-24 16:01:56 +01:00
Ghostkeeper
dbc4a90e10
Add tests for setDefinitionChangesById
One for when the ID exists, one for when it doesn't exist.

Contributes to issue CURA-3497.
2017-03-24 16:00:55 +01:00
Ghostkeeper
928181507d
Add tests for setDefinitionById
One for when the ID exists, one for when it doesn't exist.

Contributes to issue CURA-3497.
2017-03-24 15:58:32 +01:00
Ghostkeeper
f29d5e897c
Add tests for setVariantById
One for when the ID exists, one for when it doesn't exist.

Contributes to issue CURA-3497.
2017-03-24 15:55:01 +01:00
Ghostkeeper
72bbb8ec0c
Also test whether adding an extruder had any effect on the extruder list
Contributes to issue CURA-3497.
2017-03-24 15:46:29 +01:00
Ghostkeeper
55dd17cae7
Add tests for changing properties on specified containers
Other than just user, that is.

Contributes to issue CURA-3497.
2017-03-24 15:42:05 +01:00
Ghostkeeper
319fd929d8
Add test for setProperty to set properties on user changes
Contributes to issue CURA-3497.
2017-03-24 15:34:31 +01:00
Ghostkeeper
eeb84ac27b
Add tests for prohibited operations on extruder stacks
These operations are explicitly prohibited, so they should raise an exception.

Contributes to issue CURA-3497.
2017-03-24 15:11:25 +01:00
Ghostkeeper
3d7dbe2e3b
Expand constrainContainerTypes test with subclasses of container types
Subclasses should behave in the same way as their parents.

Contributes to issue CURA-3497.
2017-03-24 14:50:57 +01:00
Ghostkeeper
00c1c2dcf6
Add test to verify that you can't change types of containers
For instance, you shouldn't be able to put an instance container in the definition slot.

Contributes to issue CURA-3497.
2017-03-24 14:40:32 +01:00
Ghostkeeper
d1dc48d7e1
Add test to verify priority of resolve property
The resolve property should get priority over the value in the definition container, but not anywhere else.

Contributes to issue CURA-3497.
2017-03-24 14:27:30 +01:00
Ghostkeeper
f4673b340a
Document tests
Missing documentation here.

Contributes to issue CURA-3497.
2017-03-24 12:44:20 +01:00
Ghostkeeper
56082bdbdf
Add tests for prohibited operations
Four of these. It's probably too simple to test now, but who knows what could happen in the future.

Contributes to issue CURA-3497.
2017-03-24 12:42:35 +01:00
Ghostkeeper
f2b9f79fb3
Document test_addExtruder better
Contributes to issue CURA-3497.
2017-03-24 12:28:26 +01:00
Ghostkeeper
d40a67f2b0
Add test for addExtruder
This mainly tests if it is properly limited by the number of extruders setting.

Contributes to issue CURA-3497.
2017-03-24 12:27:39 +01:00
Ghostkeeper
86a1d3eb10
Add marker to indicate where the test cases start
Sorting also takes care of this, but it's still more clear this way.

Contributes to issue CURA-3497.
2017-03-24 12:01:23 +01:00
Ghostkeeper
4215ba3ce7
Add test for setting fall-through
This tests whether a setting still falls through properly to lower containers if it is not defined in a container.

Contributes to issue CURA-3497.
2017-03-24 11:59:19 +01:00
Ghostkeeper
a95404f72f
Add test for missing containers in container stack
This seems to give a different exception than intended at the moment.

Contributes to issue CURA-3497.
2017-03-23 17:31:21 +01:00
Ghostkeeper
f579b5f304
Clean up temporary files after test
If the test fails to remove the temporary file, this cleans up after it.

Contributes to issue CURA-3497.
2017-03-23 17:22:10 +01:00
Ghostkeeper
9ce621a02d
Restore the original container registry after each test
A bit of code duplication, but I don't see how to reduce this at the moment.

Contributes to issue CURA-3497.
2017-03-23 17:17:43 +01:00
Ghostkeeper
b18c72bbbf
Remove unused import
This was replaced with mocks, if I recall correctly.

Contributes to issue CURA-3497.
2017-03-23 16:48:38 +01:00
Ghostkeeper
053974bc96
Add test to see if legacy files are renamed
The test seems to fail at the moment. No new file is created.

Contributes to issue CURA-3497.
2017-03-23 16:47:37 +01:00
Ghostkeeper
e521f6b38d
Remove unnecessary findContainer replacement
By default the patch context returns mock objects anyway, so no need to actually make a function that does that.

Contributes to issue CURA-3497.
2017-03-23 16:35:11 +01:00
Ghostkeeper
96c7a4ed77
Remove unused variable
This was changed earlier that it doesn't return the same mock every time but creates a new mock in findContainer. So the single mock that used to be returned every time is no longer needed.

Contributes to issue CURA-3497.
2017-03-23 16:16:32 +01:00
Ghostkeeper
91192b702e
Use a global stack from a fixture
Removes a bit of duplicate code.

Contributes to issue CURA-3497.
2017-03-23 16:12:28 +01:00
Ghostkeeper
bf2050479b
Add tests for hasUserValue
These fail at the moment because they also depend on being able to change the stack, which isn't implemented yet.

Contributes to issue CURA-3497.
2017-03-23 16:09:03 +01:00
Ghostkeeper
8a3ab6d289
Fix testing ID of mock-definitions
This isn't the best solution because all definitions now have to get the ID 'some_definition', but it's the best that I could come up with so far.

Contributes to issue CURA-3497.
2017-03-23 15:46:11 +01:00
Ghostkeeper
610d2ae1e6
Fix assertion for test_deserializeDefinitionChanges
Copy-paste error there. Sorry.

Contributes to issue CURA-3497.
2017-03-23 15:41:25 +01:00
Ghostkeeper
521e85b2a7
Add test for deserializing stacks with definitions in them
This tests whether the definition is properly found.

Contributes to issue CURA-3497.
2017-03-23 15:40:44 +01:00
Ghostkeeper
91f51d11cd
Fix ID and name of only-variant stack
This makes it consistent with the file name and such.

Contributes to issue CURA-3497.
2017-03-23 15:32:27 +01:00
Ghostkeeper
15de1f235a
Add test for seeing whether definition changes are properly found
Whether the deserialize function finds the definition changes properly.

Contributes to issue CURA-3497.
2017-03-23 15:30:54 +01:00
Ghostkeeper
79f6e49280
Add test for seeing whether variants are properly found
Whether the deserialize function finds the variants properly.

Contributes to issue CURA-3497.
2017-03-23 15:21:57 +01:00
Ghostkeeper
95a377d54e
Add test for deserialising materials in stacks
Similar to the other tests, but this one is a bit special since the original test stacks had a material defined. Therefore it also defines a separate stack that only has a definition so that we can see if it's fine with the material being empty.

Contributes to issue CURA-3497.
2017-03-22 17:32:37 +01:00
Ghostkeeper
80329ad6e8
Fix test name
Oops. Copy-paste mistake.

Contributes to issue CURA-3497.
2017-03-22 17:26:37 +01:00
Ghostkeeper
66b5fe6702
Align test parameters for readability
Contributes to issue CURA-3497.
2017-03-22 17:25:22 +01:00
Ghostkeeper
eae6ad0e05
Add test to see whether quality profiles deserialise well
Works just the same as the quality-changes stuff.

Contributes to issue CURA-3497.
2017-03-22 17:24:21 +01:00
Ghostkeeper
ba43b835f4
Move reading the stack file to a separate function
That whole os.path stuff is a bit opaque. Now it's separated from the actual test.

Contributes to issue CURA-3497.
2017-03-22 17:10:04 +01:00
Ghostkeeper
09a3b90dcc
Add test for detecting quality changes
I should try to re-use a bit of code here because there's going to be a lot of these.

Contributes to issue CURA-3497.
2017-03-22 16:58:06 +01:00
Ghostkeeper
2eed596280
Align parameters better for overview
Contributes to issue CURA-3497.
2017-03-22 16:49:59 +01:00