Skip to content

Public API for filtering without running #37

@kpreid

Description

@kpreid

I have tests which I need to run in a custom way, and I'd like to be able to benefit from libtest-mimic's work to precisely emulate the standard test harness interface, but the most I can use, it seems, is using the public Arguments struct to parse arguments — there's no way to use the filtering implementation but not the runner.

Could you add a function which takes an Arguments and a set of test descriptions (like run()), and returns an iterator of which tests should be run, instead of running them? (Or in the case of --list, it would do the expected printing and return a value indicating to just exit.)

(It is of course already possible to insert placeholders as the individual test functions, but that would require each placeholder function to access global state for the real test harness, and to block until the test actually runs in order to report success/failure, which seems inelegant and potentially problematic.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions