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

Hooks added as a side effect of a called function don't get cleaned up #34

Open
brandonsturgeon opened this issue Nov 21, 2022 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed question Further information is requested

Comments

@brandonsturgeon
Copy link
Member

The test environment we create keeps track of hooks added with hook.Add and automatically cleans them up after the test completes.

However, if you call a function that calls hook.Add, they will not be tracked.

Is there a clever way of using setfenv (perhaps on a thread instead of a function?) that will let us accomplish this? Or should we just accept the fact that you need to clean up any hooks you indirectly create in your tests?

@brandonsturgeon brandonsturgeon added enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed question Further information is requested labels Nov 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant