OpenMDAO / testflo

A simple python testing framework that can run unit tests under MPI (or not).
Other
3 stars 7 forks source link

Deprecations report does not handle SubTests #109

Closed swryan closed 6 months ago

swryan commented 6 months ago

The deprecations report needs to be updated to handle SubTests.

Since support for SubTests was added, test objects in the pipeline are iterable and can be a single test or a list of SubTests. The DeprecationsReport filter needs to be updated similarly to the other filters:

DeprecationsReport (does not handle SubTests):

        for test in input_iter:
            for msg, locs in test.deprecations.items():
                deprecations[msg] = deprecations.get(msg, set()) | locs
            yield test

DurationSummary (properly handles SubTests):

        for tests in input_iter:
            for test in tests:
                durations.append((test.spec, test.end_time - test.start_time))
                yield test