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

Unregister callbacks in doctests #8276

Merged
merged 1 commit into from Oct 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions dask/diagnostics/profile.py
Expand Up @@ -51,6 +51,7 @@ class Profiler(Callback):
manually.
>>> prof.clear()
>>> prof.unregister()
"""

Expand Down Expand Up @@ -140,6 +141,8 @@ class ResourceProfiler(Callback):
Note that when used as a context manager data will be collected throughout
the duration of the enclosed block. In contrast, when registered globally
data will only be collected while a dask scheduler is active.
>>> prof.unregister()
"""

def __init__(self, dt=1):
Expand Down Expand Up @@ -322,6 +325,7 @@ class CacheProfiler(Callback):
manually.
>>> prof.clear()
>>> prof.unregister()
"""

Expand Down
1 change: 1 addition & 0 deletions dask/diagnostics/tests/test_progress.py
Expand Up @@ -68,6 +68,7 @@ def test_format_time():

def test_register(capsys):
try:
assert not Callback.active
p = ProgressBar()
p.register()

Expand Down