From f91942cd8ec38a68fb01dfcdbce66bbb6a8ccf47 Mon Sep 17 00:00:00 2001 From: VEP333 Date: Thu, 24 Sep 2026 08:17:09 +0000 Subject: [PATCH] fix: correct copyright headers in YAML test framework Python files Signed-off-by: VEP333 Change-Id: Ia10bbad8ccb97378f2c82d7329d69ffa8b14c4c9 --- common/acs_test_framework_runner/__init__.py | 18 +++++- .../case_data_builders.py | 15 +++++ .../acs_test_framework_runner/mock_helpers.py | 15 +++++ .../acs_test_framework_runner/mock_loader.py | 15 +++++ .../mock_loader_hardware_scenarios.py | 15 +++++ .../mock_loader_parser_scenarios.py | 15 +++++ .../pytest_runner.py | 15 +++++ common/acs_test_framework_runner/report.py | 15 +++++ .../runner_check_execution.py | 15 +++++ .../runner_check_validation.py | 15 +++++ .../runner_checks.py | 61 +++++++++++++++++-- .../runner_reporting.py | 15 +++++ .../test_pytest_runner_selection.py | 27 +++++++- 13 files changed, 250 insertions(+), 6 deletions(-) diff --git a/common/acs_test_framework_runner/__init__.py b/common/acs_test_framework_runner/__init__.py index 3a588c3a..cc51133e 100644 --- a/common/acs_test_framework_runner/__init__.py +++ b/common/acs_test_framework_runner/__init__.py @@ -1,3 +1,20 @@ +#!/usr/bin/env python3 +# Copyright (c) 2026, Arm Limited or its affiliates. All rights reserved. +# SPDX-License-Identifier : Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""Public exports for the ACS test framework runner package.""" + from .mock_loader import _resolve_runner_module_from_stack, stateful_run_router from .mock_loader import ConfigError as MockLoaderConfigError from .mock_helpers import ( @@ -131,4 +148,3 @@ "write_case_log", "write_junit_xml", ] - diff --git a/common/acs_test_framework_runner/case_data_builders.py b/common/acs_test_framework_runner/case_data_builders.py index 070d81c1..921af004 100644 --- a/common/acs_test_framework_runner/case_data_builders.py +++ b/common/acs_test_framework_runner/case_data_builders.py @@ -1,3 +1,18 @@ +#!/usr/bin/env python3 +# Copyright (c) 2026, Arm Limited or its affiliates. All rights reserved. +# SPDX-License-Identifier : Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. from __future__ import annotations from pathlib import Path diff --git a/common/acs_test_framework_runner/mock_helpers.py b/common/acs_test_framework_runner/mock_helpers.py index ec302d2f..3ee6a845 100644 --- a/common/acs_test_framework_runner/mock_helpers.py +++ b/common/acs_test_framework_runner/mock_helpers.py @@ -1,3 +1,18 @@ +#!/usr/bin/env python3 +# Copyright (c) 2026, Arm Limited or its affiliates. All rights reserved. +# SPDX-License-Identifier : Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. from __future__ import annotations import re diff --git a/common/acs_test_framework_runner/mock_loader.py b/common/acs_test_framework_runner/mock_loader.py index 58f50a70..a6861f1b 100644 --- a/common/acs_test_framework_runner/mock_loader.py +++ b/common/acs_test_framework_runner/mock_loader.py @@ -1,3 +1,18 @@ +#!/usr/bin/env python3 +# Copyright (c) 2026, Arm Limited or its affiliates. All rights reserved. +# SPDX-License-Identifier : Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. from __future__ import annotations import importlib diff --git a/common/acs_test_framework_runner/mock_loader_hardware_scenarios.py b/common/acs_test_framework_runner/mock_loader_hardware_scenarios.py index b217a937..6caaf3c4 100644 --- a/common/acs_test_framework_runner/mock_loader_hardware_scenarios.py +++ b/common/acs_test_framework_runner/mock_loader_hardware_scenarios.py @@ -1,3 +1,18 @@ +#!/usr/bin/env python3 +# Copyright (c) 2026, Arm Limited or its affiliates. All rights reserved. +# SPDX-License-Identifier : Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. from __future__ import annotations import json diff --git a/common/acs_test_framework_runner/mock_loader_parser_scenarios.py b/common/acs_test_framework_runner/mock_loader_parser_scenarios.py index 5dd3fd22..7ff1cdd6 100644 --- a/common/acs_test_framework_runner/mock_loader_parser_scenarios.py +++ b/common/acs_test_framework_runner/mock_loader_parser_scenarios.py @@ -1,3 +1,18 @@ +#!/usr/bin/env python3 +# Copyright (c) 2026, Arm Limited or its affiliates. All rights reserved. +# SPDX-License-Identifier : Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. from __future__ import annotations import json diff --git a/common/acs_test_framework_runner/pytest_runner.py b/common/acs_test_framework_runner/pytest_runner.py index 7bad92bc..43c6389b 100644 --- a/common/acs_test_framework_runner/pytest_runner.py +++ b/common/acs_test_framework_runner/pytest_runner.py @@ -1,3 +1,18 @@ +#!/usr/bin/env python3 +# Copyright (c) 2026, Arm Limited or its affiliates. All rights reserved. +# SPDX-License-Identifier : Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. from __future__ import annotations import argparse diff --git a/common/acs_test_framework_runner/report.py b/common/acs_test_framework_runner/report.py index 198a7453..b7e8dbf9 100644 --- a/common/acs_test_framework_runner/report.py +++ b/common/acs_test_framework_runner/report.py @@ -1,3 +1,18 @@ +#!/usr/bin/env python3 +# Copyright (c) 2026, Arm Limited or its affiliates. All rights reserved. +# SPDX-License-Identifier : Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. from __future__ import annotations import argparse diff --git a/common/acs_test_framework_runner/runner_check_execution.py b/common/acs_test_framework_runner/runner_check_execution.py index bf448f90..873ad6a7 100644 --- a/common/acs_test_framework_runner/runner_check_execution.py +++ b/common/acs_test_framework_runner/runner_check_execution.py @@ -1,3 +1,18 @@ +#!/usr/bin/env python3 +# Copyright (c) 2026, Arm Limited or its affiliates. All rights reserved. +# SPDX-License-Identifier : Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. from __future__ import annotations import importlib.util diff --git a/common/acs_test_framework_runner/runner_check_validation.py b/common/acs_test_framework_runner/runner_check_validation.py index 152fe326..38031da4 100644 --- a/common/acs_test_framework_runner/runner_check_validation.py +++ b/common/acs_test_framework_runner/runner_check_validation.py @@ -1,3 +1,18 @@ +#!/usr/bin/env python3 +# Copyright (c) 2026, Arm Limited or its affiliates. All rights reserved. +# SPDX-License-Identifier : Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. from __future__ import annotations from typing import Any diff --git a/common/acs_test_framework_runner/runner_checks.py b/common/acs_test_framework_runner/runner_checks.py index 00559353..bfb8b99d 100644 --- a/common/acs_test_framework_runner/runner_checks.py +++ b/common/acs_test_framework_runner/runner_checks.py @@ -1,3 +1,20 @@ +#!/usr/bin/env python3 +# Copyright (c) 2026, Arm Limited or its affiliates. All rights reserved. +# SPDX-License-Identifier : Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""Utilities and validation helpers for the ACS test framework runner.""" + from __future__ import annotations import ast @@ -22,6 +39,7 @@ def detect_project_root(script_dir: Path) -> Path: + """Return the project root derived from the runner script location.""" if script_dir.parent.name == "common": return script_dir.parent.parent return script_dir.parent @@ -36,11 +54,12 @@ def detect_project_root(script_dir: Path) -> Path: DESTRUCTIVE_TEST_ENV = "RUN_DESTRUCTIVE_HW_TESTS" # Runner-managed process launches must not be affected by case-level # subprocess.run mocks that target the global subprocess module. -REAL_SUBPROCESS_RUN = subprocess.run +REAL_SUBPROCESS_RUN = subprocess.run # pylint: disable=invalid-name @dataclass class TestMeta: + """Metadata describing a test case.""" suite_name: str phase: str test_type: str @@ -48,6 +67,7 @@ class TestMeta: @dataclass class TestOutcome: + """Result details and status flags for a test case.""" testcase_name: str file_path: str passed: bool @@ -64,14 +84,17 @@ class TestOutcome: @property def error(self) -> bool: + """Return whether the outcome represents an error.""" return self.flags["error"] @property def skipped(self) -> bool: + """Return whether the outcome represents a skipped case.""" return self.flags["skipped"] @property def warning(self) -> bool: + """Return whether the outcome represents a warning.""" return self.flags["warning"] @@ -85,6 +108,7 @@ class SkipCase(Exception): @dataclass class CommandRunResult: + """Captured result of a command executed by the runner.""" command_text: str stdout: str stderr: str @@ -96,10 +120,12 @@ class CommandRunResult: @dataclass(frozen=True) class RunCaseOptions: + """Options controlling execution of a test case.""" suite_command: str | None = None def create_runner_temp_dir(prefix: str = "runner_env_") -> Path: + """Create and return a unique temporary directory for runner work.""" RUNNER_WORK_DIR.mkdir(parents=True, exist_ok=True) for _ in range(100): candidate = RUNNER_WORK_DIR / f"{prefix}{uuid4().hex[:8]}" @@ -112,6 +138,7 @@ def create_runner_temp_dir(prefix: str = "runner_env_") -> Path: def load_yaml_config(yaml_file: Path) -> dict[str, Any]: + """Load a YAML configuration file and validate its top-level shape.""" try: with yaml_file.open("r", encoding="utf-8") as handle: data = yaml.safe_load(handle) or {} @@ -125,18 +152,24 @@ def load_yaml_config(yaml_file: Path) -> dict[str, Any]: def ensure_list(value: Any, field_name: str) -> list[Any]: + """Validate and return a list-valued configuration field.""" if not isinstance(value, list): raise ConfigError(f"'{field_name}' must be a list") return value def ensure_list_of_strings(value: Any, field_name: str) -> list[str]: + """Validate and return a list containing only strings.""" if not isinstance(value, list) or not all(isinstance(item, str) for item in value): raise ConfigError(f"'{field_name}' must be a list of strings") return value -def ensure_string_or_list_of_strings(value: Any, field_name: str) -> list[str]: +def ensure_string_or_list_of_strings( # pylint: disable=invalid-name + value: Any, + field_name: str, +) -> list[str]: + """Normalize a string or list of strings into a list.""" if value is None: return [] if isinstance(value, str): @@ -160,6 +193,7 @@ def merge_mappings( def sanitize_name(value: str) -> str: + """Replace unsupported name characters with underscores.""" return "".join( char if char.isalnum() or char in {"-", "_", "."} else "_" for char in value @@ -167,6 +201,7 @@ def sanitize_name(value: str) -> str: def is_valid_xml_char(code: int) -> bool: + """Return whether a Unicode code point is valid in XML.""" return ( code in {0x9, 0xA, 0xD} or 0x20 <= code <= 0xD7FF @@ -176,6 +211,7 @@ def is_valid_xml_char(code: int) -> bool: def sanitize_xml_text(value: Any) -> str: + """Convert a value to text and remove XML-invalid characters.""" if value is None: return "" if not isinstance(value, str): @@ -189,6 +225,7 @@ def sanitize_xml_text(value: Any) -> str: def resolve_target_path(file_entry: str) -> Path: + """Resolve a target path relative to the project root when needed.""" raw = Path(file_entry) if raw.is_absolute(): return raw.resolve() @@ -196,14 +233,17 @@ def resolve_target_path(file_entry: str) -> Path: def read_source(file_path: Path) -> str: + """Read and return UTF-8 source text from a file.""" return file_path.read_text(encoding="utf-8") def parse_ast(file_path: Path) -> ast.AST: + """Parse a Python source file and return its abstract syntax tree.""" return ast.parse(read_source(file_path), filename=str(file_path)) def collect_function_names(file_path: Path) -> set[str]: + """Collect function names from a Python source file.""" tree = parse_ast(file_path) names: set[str] = set() @@ -215,6 +255,7 @@ def collect_function_names(file_path: Path) -> set[str]: def format_outcome_message(prefix: str, text: str) -> str: + """Format an outcome message with optional detail text.""" text = text.strip() return prefix if not text else f"{prefix}: {text}" @@ -227,6 +268,7 @@ def create_outcome( meta: TestMeta, **kwargs: Any, ) -> TestOutcome: + """Create a test outcome from common result fields and status flags.""" return TestOutcome( testcase_name=testcase_name, file_path=file_path, @@ -243,10 +285,12 @@ def create_outcome( def build_runner_module_name(file_path: Path) -> str: + """Build a unique module name for dynamically loaded runner code.""" return f"runner_module_{sanitize_name(file_path.stem)}_{uuid4().hex}" def load_module_from_path(file_path: Path) -> Any: + """Load and return a Python module from a file path.""" module_name = build_runner_module_name(file_path) spec = importlib.util.spec_from_file_location( module_name, @@ -265,6 +309,7 @@ def load_module_from_path(file_path: Path) -> Any: def normalize_completed_stream(stream: Any) -> str: + """Normalize completed-process output into text.""" if stream is None: return "" if isinstance(stream, str): @@ -302,7 +347,11 @@ def normalize_completed_stream(stream: Any) -> str: ) -def run_post_checks(work_dir: Path, post_checks: Any) -> tuple[bool, list[str]]: +def run_post_checks( # pylint: disable=too-many-locals,too-many-branches,too-many-statements + work_dir: Path, + post_checks: Any, +) -> tuple[bool, list[str]]: + """Run configured post-checks and return their result and messages.""" if post_checks is None: return True, [] @@ -442,6 +491,7 @@ def run_post_checks(work_dir: Path, post_checks: Any) -> tuple[bool, list[str]]: def format_output_block(title: str, text: str) -> str: + """Format a titled output block and represent empty output explicitly.""" cleaned = text.rstrip() if not cleaned: cleaned = "" @@ -452,6 +502,7 @@ def append_log_file_details( details_lines: list[str], runtime_case: dict[str, Any], ) -> None: + """Append configured log-file contents to case detail lines.""" patch_constants = runtime_case.get("patch_constants", {}) if not isinstance(patch_constants, dict): return @@ -479,6 +530,7 @@ def format_expectation_failure( *, actual_label: str = "", ) -> str: + """Format details for a failed expectation check.""" lines = [ "PHASE: expectation_check", f"CHECK TYPE: {check_type}", @@ -495,11 +547,12 @@ def format_expectation_failure( return "\n".join(lines) -def validate_output_expectations( +def validate_output_expectations( # pylint: disable=too-many-locals,too-many-branches,too-many-statements case_def: dict[str, Any], stdout: str, stderr: str, ) -> tuple[bool, list[str]]: + """Validate configured expectations against captured process output.""" conditions: list[str] = [] passed = True diff --git a/common/acs_test_framework_runner/runner_reporting.py b/common/acs_test_framework_runner/runner_reporting.py index 14fa1f29..bf88cc25 100644 --- a/common/acs_test_framework_runner/runner_reporting.py +++ b/common/acs_test_framework_runner/runner_reporting.py @@ -1,3 +1,18 @@ +#!/usr/bin/env python3 +# Copyright (c) 2026, Arm Limited or its affiliates. All rights reserved. +# SPDX-License-Identifier : Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. from __future__ import annotations import shutil diff --git a/common/acs_test_framework_runner/test_pytest_runner_selection.py b/common/acs_test_framework_runner/test_pytest_runner_selection.py index d7697109..e6712c4f 100644 --- a/common/acs_test_framework_runner/test_pytest_runner_selection.py +++ b/common/acs_test_framework_runner/test_pytest_runner_selection.py @@ -1,3 +1,20 @@ +#!/usr/bin/env python3 +# Copyright (c) 2026, Arm Limited or its affiliates. All rights reserved. +# SPDX-License-Identifier : Apache-2.0 +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""Tests for pytest runner selection and reporting behavior.""" + from __future__ import annotations import importlib.util @@ -12,6 +29,7 @@ def load_harness_module(module_name: str, filename: str): + """Load a harness module directly from a file in the harness directory.""" spec = importlib.util.spec_from_file_location(module_name, HARNESS_DIR / filename) assert spec is not None assert spec.loader is not None @@ -30,6 +48,7 @@ def load_harness_module(module_name: str, filename: str): def test_harness_sources_changed_ignores_pycache() -> None: + """Verify that __pycache__ files do not count as harness source changes.""" changed_paths = { pytest_runner.HARNESS_DIR / "__pycache__" / "pytest_runner.cpython-313.pyc", } @@ -38,6 +57,7 @@ def test_harness_sources_changed_ignores_pycache() -> None: def test_select_yaml_runs_runs_all_groups_when_harness_changes(monkeypatch) -> None: + """Verify that harness changes select all YAML groups and their targets.""" yaml_files = [ pytest_runner.PROJECT_ROOT / "common" / "acs_test_framework_manifests" / "group_one.yaml", pytest_runner.PROJECT_ROOT / "common" / "acs_test_framework_manifests" / "group_two.yaml", @@ -70,6 +90,7 @@ def test_select_yaml_runs_runs_all_groups_when_harness_changes(monkeypatch) -> N def test_select_yaml_runs_preserves_target_only_selection(monkeypatch) -> None: + """Verify that direct target changes preserve target-only selection.""" yaml_files = [pytest_runner.PROJECT_ROOT / "common" / "acs_test_framework_manifests" / "group_one.yaml"] monkeypatch.setattr( @@ -103,6 +124,7 @@ def fake_get_yaml_target_entries(_yaml_file: Path) -> tuple[set[str], None]: def test_report_changed_yaml_adds_python_targets_for_static_checks(monkeypatch) -> None: + """Verify that changed YAML files contribute Python targets to static checks.""" yaml_path = report.PROJECT_ROOT / "common" / "acs_test_framework_manifests" / "group_one.yaml" yaml_target = report.PROJECT_ROOT / "common" / "linux_scripts" / "target.py" direct_python_change = report.PROJECT_ROOT / "common" / "linux_scripts" / "direct.py" @@ -130,6 +152,7 @@ def test_report_changed_yaml_adds_python_targets_for_static_checks(monkeypatch) def test_report_yaml_target_filter_keeps_only_existing_python_files(monkeypatch) -> None: + """Verify that YAML target discovery keeps only existing Python files.""" yaml_path = report.PROJECT_ROOT / "common" / "acs_test_framework_manifests" / "group_one.yaml" py_target = report.PROJECT_ROOT / "common" / "linux_scripts" / "target.py" sh_target = report.PROJECT_ROOT / "common" / "linux_scripts" / "target.sh" @@ -156,6 +179,7 @@ def fake_is_file(self) -> bool: def test_collect_pytest_case_logs_reads_persisted_case_description( monkeypatch, ) -> None: + """Verify that persisted case descriptions are read into collected logs.""" temp_path = HARNESS_DIR / "_case_log_test_reports" shutil.rmtree(temp_path, ignore_errors=True) try: @@ -184,6 +208,7 @@ def test_collect_pytest_case_logs_reads_persisted_case_description( def test_collect_pytest_case_logs_skips_missing_case_description( monkeypatch, ) -> None: + """Verify that missing case descriptions are represented as empty text.""" temp_path = HARNESS_DIR / "_case_log_test_reports" shutil.rmtree(temp_path, ignore_errors=True) try: @@ -205,4 +230,4 @@ def test_collect_pytest_case_logs_skips_missing_case_description( } ] finally: - shutil.rmtree(temp_path, ignore_errors=True) + shutil.rmtree(temp_path, ignore_errors=True) \ No newline at end of file