From 7665eaacf0780594c33670e75b3517380102263f Mon Sep 17 00:00:00 2001 From: Gabe Joseph Date: Mon, 23 May 2022 15:17:50 -0600 Subject: [PATCH] Make `gen_test`s show up in VSCode test discovery (#6424) 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. --- distributed/utils_test.py | 1 + 1 file changed, 1 insertion(+) diff --git a/distributed/utils_test.py b/distributed/utils_test.py index ed9c3e25d43..87d5c83958b 100644 --- a/distributed/utils_test.py +++ b/distributed/utils_test.py @@ -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)