Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGhostkeeper <rubend@tutanota.com>2020-02-07 15:55:07 +0300
committerGhostkeeper <rubend@tutanota.com>2020-02-07 15:55:24 +0300
commita8ccec709fbb296d516e6a94f6135550350014b7 (patch)
tree4cfc9807ac16c72652316f8d3417cbe4271be308 /tests/Settings
parenta168e9f8a6de70a3fd73dfedbc500095235b3a1f (diff)
Add test for spaces in definition IDs
Contributes to issue CURA-7201.
Diffstat (limited to 'tests/Settings')
-rw-r--r--tests/Settings/TestDefinitionContainer.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/Settings/TestDefinitionContainer.py b/tests/Settings/TestDefinitionContainer.py
index 38251e4397..9edf7f3d36 100644
--- a/tests/Settings/TestDefinitionContainer.py
+++ b/tests/Settings/TestDefinitionContainer.py
@@ -36,6 +36,14 @@ def definition_container():
assert result.getId() == uid
return result
+@pytest.mark.parametrize("file_path", definition_filepaths)
+def test_definitionIds(file_path):
+ """
+ Test the validity of the definition IDs.
+ :param file_path: The path of the machine definition to test.
+ """
+ definition_id = os.path.basename(file_path).split(".")[0]
+ assert " " not in definition_id # Definition IDs are not allowed to have spaces.
## Tests all definition containers
@pytest.mark.parametrize("file_path", machine_filepaths)