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

Adapt the lock() mechanism as a core part of o.spy() #54

Open
pygy opened this issue Jan 25, 2023 · 0 comments
Open

Adapt the lock() mechanism as a core part of o.spy() #54

pygy opened this issue Jan 25, 2023 · 0 comments

Comments

@pygy
Copy link
Member

pygy commented Jan 25, 2023

In the Mithril test suite, @dead-claudia uses a lock utility that tracks stray calls to functions after a test is finished. This should be a core functionality of o.spy()

The groundwork I'm doing to fix #50 should make the default case easy (spies defined during a test should not run when it's done. Spies defined at test-definition time shouldn't expire though.

It may be possible to have spies defined in before/beforeEach hooks to last until the matching after/afterEach hook.

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