Marijn Deé
294527f7fe
Review changes
2018-11-23 09:21:09 +01:00
Marijn Deé
bb5c0326de
Used duoble quotes iso single quotes
2018-11-23 09:20:19 +01:00
Marijn Deé
352427e460
Moved exception handling closer to the cause of error
2018-11-22 10:01:15 +01:00
Marijn Deé
7e3f86f091
Moved some of the mocks to class level because they are used in every test method
2018-11-22 09:37:47 +01:00
Marijn Deé
7b0f8882a2
Reverted models to namedtuples from collections because
...
NamedTuple is a Python3.6 feature
2018-11-21 11:01:26 +01:00
Marijn Deé
9e8be286af
Used NamedTuple from typing iso namedtuple from collections so we can at least give type hints
2018-11-21 10:12:53 +01:00
Marijn Deé
f3338aa187
Fixed the failing tests
2018-11-20 16:53:01 +01:00
Marijn Deé
ca60744292
Made the tests work with the named tuples
...
Tests only use the _onGetRemoteMaterial
2018-11-20 16:34:11 +01:00
Marijn Deé
481ca8cd2f
Fixed some bugs and added the color_code field to the named tuple
2018-11-20 16:33:52 +01:00
ChrisTerBeke
2497325d60
Test with named tuples, not working yet
2018-11-19 16:35:19 +01:00
ChrisTerBeke
c04ce7fce8
Use call_count on specific method to be more precise
2018-11-19 15:44:07 +01:00
ChrisTerBeke
60dd130393
Use logException where possible
2018-11-19 15:39:12 +01:00
ChrisTerBeke
66fbadf2de
Convert all single quotes to double quotes
2018-11-19 15:37:56 +01:00
ChrisTerBeke
9d8583a3b6
Revert "Fix running tests in plugin using pytest"
...
This reverts commit f8f133d2ef92dfabb636eac70b09e681bd4b4d63.
2018-11-19 15:10:35 +01:00
ChrisTerBeke
d65114bd56
use call_count to assert device was not called
2018-11-19 15:08:58 +01:00
ChrisTerBeke
0b1ac87354
Fix some formatting, cleanup import
2018-11-19 15:03:43 +01:00
ChrisTerBeke
dc17bd8499
Fix the first tests
2018-11-19 13:54:45 +01:00
ChrisTerBeke
f8f133d2ef
Fix running tests in plugin using pytest
2018-11-19 13:42:28 +01:00
ChrisTerBeke
951a21ead7
Merge branch 'master' into tests-for-um3networkplugin
2018-11-19 10:58:07 +01:00
ChrisTerBeke
ee9210d8d1
Rewrite tests
2018-11-19 10:57:47 +01:00
ChrisTerBeke
23e957e1c5
Some more refactoring, splitting up methods
2018-11-19 10:44:24 +01:00
Marijn Deé
22aac7b566
Renamed TestContainerRegistry to ContainerRegistryMock
2018-11-16 16:35:08 +01:00
Marijn Deé
565f009e9b
Added comments
2018-11-16 16:34:44 +01:00
Marijn Deé
1000625d69
Added spaces around all =
2018-11-16 16:07:17 +01:00
Marijn Deé
0062250238
Moved the test to the plugin directory
2018-11-16 16:06:36 +01:00
Marijn Deé
695d45ffbe
Initialize the models with None
2018-11-16 15:54:07 +01:00
Marijn Deé
e9e8c49b2d
Added tests for SendMaterialJob and refactored SendMaterialJob for
...
better testability. This is part of a larger project to create tests
for the UM3NetworkPrinting plugin in preparation for printing from the
cloud
2018-11-16 14:16:45 +01:00
Ghostkeeper
e9216936d7
Compare SDK version as Version instances
...
This allows it to compare versions that are remote as integer and local as string, or vice-versa. Much more robust.
Contributes to issue CURA-5940.
2018-11-15 15:20:21 +01:00
Ghostkeeper
78e6494430
Read SDK version from new semver field
...
The sdk_version field should stay the ordinary plain number (the major version number of the semver field) so that older Cura versions don't break. Newly built packages will get built with both sdk_version_semver and the normal sdk_version, so that the packages can be read with any Cura version from 3.6 onwards.
Contributes to issue CURA-5940.
2018-11-15 15:13:36 +01:00
Ghostkeeper
163f102dda
Make extension menu items translatable
...
If these extension plug-ins don't set their menu names, the plug-in name is used as the menu name. The plug-in names are not translated, so this appears as an untranslated string then.
2018-11-15 09:38:14 +01:00
alekseisasin
103d79c89d
Merge pull request #4781 from Ultimaker/fix_legacy_profile_importer
...
Fix legacy profile importer
2018-11-14 13:00:39 +01:00
Remco Burema
5f4e3948d3
Merge branch 'master' into CURA-5840-make-plugin-sdk-use-semantic-versioning
2018-11-13 13:16:22 +01:00
Ghostkeeper
87cbc3907c
Convert to string before storing in configparser
...
Because configparser can only handle strings.
Contributes to issue CURA-5929.
2018-11-13 12:05:14 +01:00
Ghostkeeper
7bd55f5064
Add test for read() function
...
This is complex.
I don't want to get into the actual translations from the DoD here.
Contributes to issue CURA-5929.
2018-11-12 16:28:29 +01:00
Ghostkeeper
bfe5ae6f9c
Merge branch '3.6'
2018-11-12 15:48:22 +01:00
Ghostkeeper
7e87a303cb
Remove config_section parameter
...
Just always take 'profile'. We don't need to test with anything else. Just adjust the data to it.
Contributes to issue CURA-5929.
2018-11-12 13:49:13 +01:00
Ghostkeeper
e18ea4bca4
Expect a NoSectionError if testing with a section that is missing
...
We want to get that error in order to debug.
Contributes to issue CURA-5929.
2018-11-12 13:47:24 +01:00
Ghostkeeper
53c9cdc3fe
Add alternative scenarios for prepareLocals
...
Contributes to issue CURA-5929.
2018-11-12 13:42:14 +01:00
Ghostkeeper
91e8c177fe
Add test for prepareLocal
...
Contributes to issue CURA-5929.
2018-11-12 13:35:18 +01:00
Ghostkeeper
0bf7bf4cbe
Fix handling dictionaries without 'defaults' section
...
According to the test, this should return an empty dict then.
Contributes to issue CURA-5929.
2018-11-12 13:33:44 +01:00
Ghostkeeper
bbbb08c793
Add test for prepareDefaults
...
Contributes to issue CURA-5929.
2018-11-12 13:02:28 +01:00
Ghostkeeper
27aff4e5da
Fix typing issues
...
Because this function now has typing, it's raising a load of issues with it.
Contributes to issue CURA-5929.
2018-11-12 12:48:49 +01:00
Ghostkeeper
6022ed0f23
Update target version in DoD
...
There are no changes to these settings, luckily.
This target version is now only here for documentation (like source_version was). It is no longer actually used by the code.
Contributes to issue CURA-5929.
2018-11-12 12:06:00 +01:00
Ghostkeeper
6ad682b00d
Don't serialise legacy profile via Profile instance
...
That profile instance was being explicitly set to version 1 (but then serialised as version 4) and then deserialised with upgrade, so the upgrade was thinking it was upgrading from version 1 to 4, but it was actually upgrading a file which was already at version 4. We shouldn't use the Profile() instance at all but just perform the upgrade on simple string data generated by the configparser.
This also updates the format to the newest version (since that was easiest for me to reimplement) but we don't need to ever update this again because it gets passed through the version upgrade system, which upgrades it from version 4000005 to the latest version in the future.
Contributes to issue CURA-5929.
2018-11-12 12:02:49 +01:00
Ghostkeeper
9d94b0d63e
Rename input vs. output parsers
...
Technically you could re-use the variable name but that is confusing.
Contributes to issue CURA-5929.
2018-11-12 11:16:33 +01:00
Mark
3d1a9a6f5b
Increase lines shown from 3 to 6
2018-11-12 09:28:48 +01:00
Remco Burema
8e05c2adcb
Have translation instead of plain string for Safety Data Sheets and Printing Guidelines. [CURA-5922]
2018-11-09 15:27:02 +01:00
Remco Burema
9bc85fcda7
Merge branch 'CURA-5922_add_safety_data_sheet_links' of https://github.com/Ultimaker/Cura into master_CURA-5922_add_safety_data_sheet_links
2018-11-09 15:16:22 +01:00
Ghostkeeper
7f54cacd0f
Code style
...
Discovered during work on CURA-5840.
2018-11-09 14:11:38 +01:00
Remco Burema
c8d9ad37ff
Add Printing Guidelines links to materials in Marketplace. [CURA-5922]
2018-11-09 13:49:14 +01:00