mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-06-26 01:15:28 -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
|
@ -265,6 +265,10 @@ pycharm_targets:
|
|||
module_name: Cura
|
||||
name: pytest in TestSettingVisibilityPresets.py
|
||||
script_name: tests/Settings/TestSettingVisibilityPresets.py
|
||||
- jinja_path: .run_templates/pycharm_cura_test.run.xml.jinja
|
||||
module_name: Cura
|
||||
name: pytest in TestStartEndGCode.py
|
||||
script_name: tests/Machines/TestStartEndGCode.py
|
||||
|
||||
pip_requirements_core:
|
||||
any_os:
|
||||
|
|
|
@ -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