Skip to content

Commit

Permalink
Make gen_tests show up in VSCode test discovery (#6424)
Browse files Browse the repository at this point in the history
Not entirely sure why, but `@functools.wraps` on the test function makes them show up. This is convenient when VSCode users want to debug a `@gen_test` test.
  • Loading branch information
gjoseph92 authored May 23, 2022
1 parent 00a6445 commit 7665eaa
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions distributed/utils_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -816,6 +816,7 @@ async def test_foo():
timeout = 3600

def _(func):
@functools.wraps(func)
def test_func(*args, **kwargs):
with clean(**clean_kwargs) as loop:
injected_func = functools.partial(func, *args, **kwargs)
Expand Down

0 comments on commit 7665eaa

Please sign in to comment.