[PATCH v3 06/12] dst: add basic capability support
Jeremy Spewock
jspewock at iol.unh.edu
Thu Sep 5 17:27:36 CEST 2024
On Thu, Sep 5, 2024 at 5:50 AM Juraj Linkeš <juraj.linkes at pantheon.tech> wrote:
<snip>
> >> @@ -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.
>
> Ah, I missed this, thanks.
>
> > 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.
>
> And also test cases.
>
> > 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.
> >
>
> I want to add this:
> The combined required capabilities of both the test suite and the subset
> of test cases.
>
> I think this makes it clear that it's different from the individual
> required capabilities of test suites and cases. Let me know what you think.
>
Yeah, I also think that makes the difference clear, sounds great to me, thanks!
> >> +
> >> + 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>
> >>
>
More information about the dev
mailing list