544 Commits

Author SHA1 Message Date
Kostas Karmas
67c6d6da08 Fix assertion
CURA-7833
2020-11-10 16:54:53 +01:00
Kostas Karmas
644c3443b1 Add tests for correctPrintSequence
CURA-7833
2020-11-10 16:47:16 +01:00
Remco Burema
9afbc64934
Merge branch '4.8' 2020-11-10 11:31:53 +01:00
Kostas Karmas
69e0e1c4e5 Remove outdated tests
CURA-7827
2020-11-09 17:50:45 +01:00
Kostas Karmas
1719394049 Patch the updateNumberExtrudersEnabled temporarily
CURA-7827
2020-11-06 09:38:15 +01:00
Kostas Karmas
bd5ed7a3ac Add tests for _correctPrintSequence
CURA-7827
2020-11-06 09:21:55 +01:00
Kostas Karmas
c1becbe43c Fix failing tests in TestMachineManager
When the machine manager calls the _onGlobalContainerChanged(), it calls updateNumberExtruders
Enabled, which triggers the signal numberExtrudersEnabledChanged. This, in turn, triggers the need
to check the MachineManager's pyqtProperty numberExtrudersEnabled. Now, since this property has no
setter, it cannot be patched. Instead, to work properly, patch the updateNumberExtrudersEnabled.

CURA-7827
2020-11-06 09:19:21 +01:00
Kostas Karmas
f0348104f8 Skip running the tests for the old arrange algorithm
So that the output of the CI/CD testing step is not cluttered with deprecation warnings.

Done during TTT
2020-10-30 14:11:00 +01:00
Ghostkeeper
6abfa38838
More fixes for PyCapsule_GetPointer race condition
One of the weirdest errors out there, and as far as I know we're the only ones suffering from it, due to having multiple packages of Python bindings created with Sip as well as having PyQt and different threads.
2020-10-16 14:26:27 +02:00
Ghostkeeper
26cb661240
Fix PyCapsule_GetPointer error when running tests
This obscure error happens when a module with Sip bindings is being imported after PyQt. Due to a clash with the Sip versions or something, it then fails on the custom module. Import all of our custom modules with Sip bindings first.
2020-10-16 14:18:17 +02:00
Jaime van Kessel
0493fb24df
Add extra human readable strings to asserts 2020-10-09 15:08:27 +02:00
Jaime van Kessel
8f4dd3cb12
Made the asserts of the profile tests a bit more explicit
This makes it easier to read the test outcome, since it gives
much better hints what can / needs to be done to fix it.
2020-10-09 14:02:47 +02:00
Jaime van Kessel
bfef61ad81
Use fastConfigParser for the versionUpToDate test
This makes the test a fair bit faster!
2020-10-09 13:58:26 +02:00
Jaime van Kessel
f31490125c
Add test to check if profile ID's are unique
CURA-7763
2020-10-09 13:53:58 +02:00
Jaime van Kessel
b35c8ba9bc
Add recalculate call to tests 2020-09-07 10:22:23 +02:00
Jaime van Kessel
87fb495e07
Add some property tests for MachineManager 2020-08-21 16:36:04 +02:00
Jaime van Kessel
1affc345b9
Add test for clearUserSettingAllCurrentStacks 2020-08-21 16:02:26 +02:00
Jaime van Kessel
ef4fae5b80
Expand tests for hasUserSettings 2020-08-21 15:39:03 +02:00
Jaime van Kessel
e1e0a4d32c
Expand the getMachine test 2020-08-21 15:16:29 +02:00
Jaime van Kessel
ce930220e9
Add tests for SetActiveMachine 2020-08-21 15:14:44 +02:00
Jaime van Kessel
43efac491d
Fix the unit test
Previously we would only look at the state, but that isn't the only thing it should look at.
It should override the value of a resolve if it's defined in user changes or QualityChanges.
2020-08-14 15:41:40 +02:00
Ghostkeeper
db15bc84cf
Correct and consistent spelling of g-code
This spelling is in Ultimaker's style guide.
We use g-code, and capitalise the G if it's at the start of a sentence or header.
Pretty good score, considering there are literally thousands of user- or log-visible strings mentioning g-code across Cura.
2020-07-20 13:36:49 +02:00
Nino van Hooff
816aaafc19 Revert changes for CURA-5479
It was decided that functionality present in existing plugins is
sufficient. No need to replicate it in our own codebase and
take on the burden of maintenance

CURA-5479
2020-07-07 16:11:03 +02:00
Nino van Hooff
06284b6a73 Implement Review comments
CURA-5479
2020-07-01 16:47:20 +02:00
Nino van Hooff
adf082a4ad Fix TextPrintInformation
CURA-5479
2020-07-01 14:59:14 +02:00
Jaime van Kessel
22de878e5c
Merge branch 'CURA-7473_account_pending_update_button' of github.com:Ultimaker/Cura 2020-06-29 15:11:42 +02:00
Christian Clauss
e78248eaf3
Avoid SyntaxWarning on Python >= 3.8 2020-06-28 15:20:44 +02:00
Nino van Hooff
294afdb7ca Connect sync timer to sync() for consistency and add unit tests.
Also rename a function to camelCase

CURA-7473
2020-06-26 16:09:33 +02:00
Jaime van Kessel
cb657ac45a
Some minor stylechanges in tests 2020-06-19 15:34:13 +02:00
Jaime van Kessel
ea0c8ff9bc
Implement setDirty for mockContainer 2020-06-18 18:05:07 +02:00
Ghostkeeper
93c84d5bc0
Mock the limit_to_extruder property with an actual value
This is necessary because our code now converts this to an integer. Mocks can't be converted to an integer, so the sub-magic-mock here can't be used. We need to provide something that can be cast to an integer.
2020-06-02 14:01:09 +02:00
Ghostkeeper
825a34d418
Mock the extruderList
Otherwise the list of extruders becomes a MagicMock. Adding a list to a MagicMock is again a MagicMock, and when iterating over that it doesn't result in any iterations. As a result, the for loop that clears all user containers didn't clear anything and the test failed.
2020-06-02 13:46:17 +02:00
Ghostkeeper
0d9053881c
Remove use of deprecated extruders property
Removes lots of warnings from the test log, since there the logger doesn't prevent creating multiple of those.

Done during Turbo Testing and Tooling.
2020-05-29 17:47:56 +02:00
Ghostkeeper
e098f98a7d
Remove unused mock of extruders property
The extruders property is no longer being used by the code under test, so this mock is unnecessary. It's also a deprecated property.

Done during Turbo Testing and Tooling.
2020-05-29 17:35:42 +02:00
Ghostkeeper
962e375dad
Remove mocking of deprecated field
This field is no longer used by the code under test.
2020-05-29 17:26:33 +02:00
Ghostkeeper
90de482313
Don't mock deprecated property
This property is deprecated. It's no longer used by the Build Volume code. Apparently it was unnecessary, too.

Done during Turbo Testing and Tooling.
2020-05-29 17:24:56 +02:00
Nino van Hooff
89f0970a88 Remove trailing whitespace from Python files 2020-05-29 14:30:33 +02:00
Nino van Hooff
ff3f4c99a8 Remove incorrect comment 2020-05-28 17:34:04 +02:00
Nino van Hooff
58ffc9dcae Merge remote-tracking branch 'origin/master' into doxygen_to_restructuredtext_comments
# Conflicts:
#	cura/API/__init__.py
#	cura/Settings/CuraContainerRegistry.py
#	cura/Settings/ExtruderManager.py
#	plugins/PostProcessingPlugin/scripts/PauseAtHeight.py
#	plugins/UM3NetworkPrinting/src/Cloud/CloudApiClient.py
#	plugins/UM3NetworkPrinting/src/Cloud/ToolPathUploader.py
#	plugins/UM3NetworkPrinting/src/Network/LocalClusterOutputDeviceManager.py
2020-05-28 17:31:24 +02:00
Nino van Hooff
c2c96faf5f Convert remaining doxygen to rst 2020-05-28 17:13:44 +02:00
Ghostkeeper
b231a4b3a2
Remove unnecessary re-adding of extruders
This was originally added for backwards compatibility with old versions of Uranium. However the link between Cura versions and Uranium versions is already very strong (Cura crashes with old Uranium versions) so this is not necessary.
It was also adding warnings in our log that these extruders had already been added to the printer.

Done during Turbo Testing and Tooling, to clean up our log files.
2020-05-15 14:26:44 +02:00
Nino van Hooff
f34e05ac03
Merge pull request #7743 from Ultimaker/CURA-7427_Add_option_to_sign_in_with_different_account_while_waiting_for_printers
Cura 7427 add option to sign in with different account while waiting for printers
2020-05-12 17:39:07 +02:00
Kostas Karmas
eac4d3e463 Make login parametrized with a force_logout boolean
Instead of using a separate function to force logging out before
login, login now has a boolean parameter that instructs it to logout
before loging in again, if the user is alread logged in. It then
starts the authorization with a force browser logout first.

CURA-7427
2020-05-12 16:54:41 +02:00
Ghostkeeper
a2f509c255
Merge branch 'Add_test_for_maximum_platform_mesh_size' 2020-05-12 13:20:55 +02:00
Kostas Karmas
32efb8d7bb Fix description comment of _generate_auth_url()
CURA-7427
2020-05-12 13:17:18 +02:00
Kostas Karmas
d3fb002d9b Transfer the generation of the auth link into its own function
The authentication link should be prepended with a logoff link from
mycloud, if it is requested. In order to make this process testable
this commit separates the generation of the authentication link,
based on whether it requests for a browser logoff first, into its
own function.

This commit also adds tests for this function.

CURA-7427
2020-05-12 13:07:39 +02:00
Kostas Karmas
96387ef2aa Add tests for loginWithForcedLogout() in account
CURA-7427
2020-05-12 13:06:47 +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
Ghostkeeper
17af83bc19
Also test for the normal Version number
It rarely changes so it's less of a problem, but you never know.
2020-05-08 12:18:48 +02:00