Just one comment about adding something to a doc-string, otherwise
looks good to me:

Reviewed-by: Jeremy Spewock <jspew...@iol.unh.edu>

On Wed, Aug 21, 2024 at 10:53 AM Juraj Linkeš
<juraj.lin...@pantheon.tech> wrote:
<snip>
> diff --git a/dts/framework/test_result.py b/dts/framework/test_result.py
> index 306b100bc6..b4b58ef348 100644
> --- a/dts/framework/test_result.py
> +++ b/dts/framework/test_result.py
> @@ -25,10 +25,12 @@
>
>  import os.path
>  from collections.abc import MutableSequence
> -from dataclasses import dataclass
> +from dataclasses import dataclass, field
>  from enum import Enum, auto
>  from typing import Union
>
> +from framework.testbed_model.capability import Capability
> +
>  from .config import (
>      OS,
>      Architecture,
> @@ -63,6 +65,12 @@ class is to hold a subset of test cases (which could be 
> all test cases) because
>
>      test_suite_class: type[TestSuite]
>      test_cases: list[type[TestCase]]
> +    required_capabilities: set[Capability] = field(default_factory=set, 
> init=False)

This should probably be added to the Attributes section of the
doc-string for the class. When it's there, it might also be useful to
explain that this is used by the runner to determine what capabilities
need to be searched for to mark the suite for being skipped. The only
reason I think that would be useful is it helps differentiate this
list of capabilities from the list of required capabilities that every
test suite and test case has.

> +
> +    def __post_init__(self):
> +        """Gather the required capabilities of the test suite and all test 
> cases."""
> +        for test_object in [self.test_suite_class] + self.test_cases:
> +            
> self.required_capabilities.update(test_object.required_capabilities)
<snip>
>

Reply via email to