mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 23:23:57 -06:00
Refactoring (Renaming variables so they are more clear & update documentation)
This commit is contained in:
parent
23ca2a3f54
commit
45dca3f878
3 changed files with 37 additions and 42 deletions
|
@ -3,7 +3,7 @@
|
|||
import pytest
|
||||
|
||||
from cura.MachineAction import MachineAction
|
||||
from cura.MachineActionManager import MachineActionManager, NotUniqueMachineAction, UnknownMachineAction
|
||||
from cura.MachineActionManager import MachineActionManager, NotUniqueMachineActionError, UnknownMachineActionError
|
||||
|
||||
class Machine:
|
||||
def __init__(self, key = ""):
|
||||
|
@ -26,7 +26,7 @@ def test_addMachineAction():
|
|||
assert machine_manager.getMachineAction("key_that_doesnt_exist") is None
|
||||
|
||||
# Adding the same machine action is not allowed.
|
||||
with pytest.raises(NotUniqueMachineAction):
|
||||
with pytest.raises(NotUniqueMachineActionError):
|
||||
machine_manager.addMachineAction(test_action)
|
||||
|
||||
# Check that the machine has no supported actions yet.
|
||||
|
@ -48,7 +48,7 @@ def test_addMachineAction():
|
|||
assert machine_manager.getRequiredActions(test_machine) == set()
|
||||
|
||||
## Ensure that only known actions can be added.
|
||||
with pytest.raises(UnknownMachineAction):
|
||||
with pytest.raises(UnknownMachineActionError):
|
||||
machine_manager.addRequiredAction(test_machine, "key_that_doesnt_exist")
|
||||
|
||||
## Check if adding single required action works
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue