Skip to content

Commit

Permalink
Do not require pytest_timeout (#6224)
Browse files Browse the repository at this point in the history
  • Loading branch information
fjetter authored Apr 27, 2022
1 parent b6a62f8 commit b837003
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion distributed/utils_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,15 @@
except ImportError:
pass

from pytest_timeout import is_debugging
try:
from pytest_timeout import is_debugging
except ImportError:

def is_debugging() -> bool:
# The pytest_timeout logic is more sophisticated. Not only debuggers
# attach a trace callback but vendoring the entire logic is not worth it
return sys.gettrace() is not None


logger = logging.getLogger(__name__)

Expand Down

0 comments on commit b837003

Please sign in to comment.