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

Add global setup/teardown hooks for test suites #256

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

kikijiki
Copy link

Fixes #251

I tried to keep it simple and use what was already available in the macro.
Adding more info for setup/teardown could be nice but it involves changing a lot of stuff, and it can (partially) be done externally by hooking your own tests.

@sunshowers
Copy link
Member

Hey -- sorry about missing this earlier. Been thinking about it for a few days. How do you feel about letting you change the name of the function instead? That way you can have your own main that does setup and teardown.

@kikijiki
Copy link
Author

kikijiki commented Feb 2, 2025

I like your suggestion of allowing users to write their own main function, it would actually be a better solution since it would allow sharing data between setup and teardown without having to use statics. Feel free to close this PR if you want to go with that instead.

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

Successfully merging this pull request may close these issues.

Add global setup/teardown hooks for test suites
2 participants