Skip to content

Add python tests model classes #16

Add python tests model classes

Add python tests model classes #16

Triggered via pull request November 8, 2023 23:58
@rquiduterquidute
synchronize #19
Status Success
Total duration 22s
Artifacts

spell-check.yml

on: pull_request_target
spellcheck
12s
spellcheck
Fit to window
Zoom out
Zoom in

Annotations

9 errors
app/tests/python_tests/test_python_test_suite.py#L97
Line too long (90 > 88 characters) (E501)
app/tests/python_tests/test_python_test_suite.py#L109
Line too long (99 > 88 characters) (E501)
/home/runner/work/certification-tool-backend/certification-tool-backend/test_collections/sdk_tests/support/python_testing/models/python_test_parser.py#L66
for class_ in classes: methods = [m for m in class_.body if isinstance(m, ast.FunctionDef)] for method in methods: if "desc_" in method.name: - tc_desc = method.body[BODY_INDEX].value.value # type: ignore + tc_desc = method.body[BODY_INDEX].value.value # type: ignore elif "steps_" in method.name: tc_steps = __retrieve_steps(method) return tc_desc, tc_steps def __retrieve_steps(method: ast.FunctionDef) -> List[PythonTestStep]: python_steps: List[PythonTestStep] = [] - for step in method.body[BODY_INDEX].value.elts: # type: ignore + for step in method.body[BODY_INDEX].value.elts: # type: ignore step_name = step.args[ARG_STEP_DESCRIPTION_INDEX].value arg_is_commissioning = False if ( step.keywords and "is_commissioning" in step.keywords[KEYWORD_IS_COMISSIONING_INDEX].arg
test_collections/sdk_tests/support/python_testing/models/python_test_parser.py#L71
At least two spaces before inline comment (E261)
/home/runner/work/certification-tool-backend/certification-tool-backend/test_collections/sdk_tests/support/python_testing/models/test_case.py#L31
"""Base class for all Python based test cases. This class provides a class factory that will dynamically declare a new sub-class based on the test-type the Python test is expressing. - The PythonTest will be stored as a class property that will be used at run-time + The PythonTest will be stored as a class property that will be used at run-time in all instances of such subclass. """ python_test: PythonTest python_test_version: str
test_collections/sdk_tests/support/python_testing/models/python_test_parser.py#L80
At least two spaces before inline comment (E261)
/home/runner/work/certification-tool-backend/certification-tool-backend/test_collections/sdk_tests/support/python_testing/models/test_case.py#L45
"""Test Case level PICS. Read directly from parsed python test.""" return cls.python_test.PICS @classmethod def default_test_parameters(cls) -> dict[str, Any]: - """Python test config dict, sometimes have a nested dict with type + """Python test config dict, sometimes have a nested dict with type and default value. Only defaultValue is used in this case. """ parameters = {} for param_name, value in cls.python_test.config.items():