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 context support for the speedtesting #13

Open
Legorooj opened this issue Jun 16, 2020 · 0 comments
Open

Add context support for the speedtesting #13

Legorooj opened this issue Jun 16, 2020 · 0 comments
Assignees
Labels
feature New feature or request
Milestone

Comments

@Legorooj
Copy link
Owner

Context functions could be passed to the speedtesting classes (and functions), and be used as context managers for running the tests. Eg:

>>> from sloth.context import supress_stdout
>>> from sloth.simple import time_callable
>>> import sys
>>> time_callable(lambda x: print(x), 2, 'this will not get printed', context=supress_stdout)
...
@Legorooj Legorooj added the feature New feature or request label Jun 16, 2020
@Legorooj Legorooj self-assigned this Jun 16, 2020
@Legorooj Legorooj added this to the Release 0.3 milestone Jun 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant