mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Add unit test for single-line statement
CURA-12386
This commit is contained in:
parent
f9b8bc20c2
commit
2f2a93b9d0
2 changed files with 19 additions and 7 deletions
|
@ -7,12 +7,6 @@ from unittest.mock import MagicMock
|
|||
from plugins.CuraEngineBackend.StartSliceJob import GcodeStartEndFormatter
|
||||
|
||||
|
||||
# def createMockedInstanceContainer(container_id):
|
||||
# result = MagicMock()
|
||||
# result.getId = MagicMock(return_value=container_id)
|
||||
# result.getMetaDataEntry = MagicMock(side_effect=getMetadataEntrySideEffect)
|
||||
# return result
|
||||
|
||||
class MockValueProvider:
|
||||
## Creates a mock value provider.
|
||||
#
|
||||
|
@ -259,7 +253,7 @@ Q2000
|
|||
''
|
||||
),
|
||||
|
||||
(
|
||||
(
|
||||
'Unexpected end character',
|
||||
None,
|
||||
'''{if material_temperature > 200, 0}}
|
||||
|
@ -270,6 +264,20 @@ S2000
|
|||
'''S2000
|
||||
'''
|
||||
),
|
||||
|
||||
(
|
||||
'Multiple replaces on single line',
|
||||
None,
|
||||
'''BT={bed_temperature} IE={initial_extruder}''',
|
||||
'''BT=50.0 IE=0'''
|
||||
),
|
||||
|
||||
(
|
||||
'Multiple extruder replaces on single line',
|
||||
None,
|
||||
'''MT0={material_temperature, 0} MT1={material_temperature, 1}''',
|
||||
'''MT0=190.0 MT1=210.0'''
|
||||
),
|
||||
]
|
||||
|
||||
def pytest_generate_tests(metafunc):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue