Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Public API for filtering without running #37

Open
kpreid opened this issue Mar 11, 2024 · 0 comments
Open

Public API for filtering without running #37

kpreid opened this issue Mar 11, 2024 · 0 comments

Comments

@kpreid
Copy link

kpreid commented Mar 11, 2024

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.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant