Skip to content

Commit

Permalink
Fix suite names for custom python tests (#168)
Browse files Browse the repository at this point in the history
  • Loading branch information
rquidute authored and hiltonlima committed Dec 17, 2024
1 parent 77def30 commit 5b50541
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,7 @@ def __class_factory(
"name": name,
"python_test_version": python_test_version,
"metadata": {
"public_id": (
name if python_test_version != "custom" else name + "-custom"
),
"public_id": name,
"version": "0.0.1",
"title": name,
"description": name,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,25 +55,30 @@
def _init_test_suites(
python_test_version: str,
) -> dict[SuiteType, PythonSuiteDeclaration]:
# Append `custom` text in order to differ from the regular suite name
version: str = ""
if python_test_version == "custom":
version += "-custom"

return {
SuiteType.MANDATORY: PythonSuiteDeclaration(
name="Python Testing Suite - Mandatories",
name="Python Testing Suite - Mandatories" + version,
suite_type=SuiteType.MANDATORY,
version=python_test_version,
mandatory=True,
),
SuiteType.COMMISSIONING: PythonSuiteDeclaration(
name="Python Testing Suite",
name="Python Testing Suite" + version,
suite_type=SuiteType.COMMISSIONING,
version=python_test_version,
),
SuiteType.NO_COMMISSIONING: PythonSuiteDeclaration(
name="Python Testing Suite - No commissioning",
name="Python Testing Suite - No commissioning" + version,
suite_type=SuiteType.NO_COMMISSIONING,
version=python_test_version,
),
SuiteType.LEGACY: PythonSuiteDeclaration(
name="Python Testing Suite - Old script format",
name="Python Testing Suite - Old script format" + version,
suite_type=SuiteType.LEGACY,
version=python_test_version,
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def __class_factory(cls, name: str, yaml_version: str) -> Type[T]:
"name": name,
"yaml_version": yaml_version,
"metadata": {
"public_id": name if yaml_version != "custom" else name + "-custom",
"public_id": name,
"version": "0.0.1",
"title": name,
"description": name,
Expand Down

0 comments on commit 5b50541

Please sign in to comment.