Skip to content
This repository has been archived by the owner on Aug 26, 2021. It is now read-only.

Commit

Permalink
Merge branch 'hotfix/asyncio_timeout_hang'
Browse files Browse the repository at this point in the history
  • Loading branch information
Cobular committed Jan 28, 2021
2 parents 9af199c + 0461706 commit 1d96b62
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 12 deletions.
3 changes: 0 additions & 3 deletions .github/FUNDING.yml

This file was deleted.

8 changes: 4 additions & 4 deletions .github/workflows/run_tests_matrix.yml
Expand Up @@ -8,7 +8,7 @@ on:
branches: [ develop ]

jobs:
build:
build-matrix:

runs-on: ubuntu-latest
strategy:
Expand All @@ -19,9 +19,9 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v2
with:
python-version: 3.9
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand All @@ -37,7 +37,7 @@ jobs:
TESTER_TOKEN: ${{ secrets.TESTER_TOKEN }}
TARGET_TOKEN: ${{ secrets.TARGET_TOKEN }}

test_docs:
test_docs_matrix:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion distest/TestInterface/_oddballs.py
Expand Up @@ -45,7 +45,7 @@ def check(human_reaction, user):
reaction: Reaction = await self.client.wait_for(
"reaction_add", timeout=self.client.timeout, check=check
)
except _base.TimeoutError:
except (_base.TimeoutError, TimeoutError):
raise HumanResponseTimeout
else:
reaction, _ = reaction
Expand Down
7 changes: 4 additions & 3 deletions distest/TestInterface/_wait_for.py
@@ -1,5 +1,6 @@
from distest.exceptions import NoResponseError
from concurrent.futures import _base
from asyncio.exceptions import TimeoutError
from typing import Callable, Optional


Expand All @@ -23,7 +24,7 @@ def check_reaction(reaction, user):
result = await self.client.wait_for(
"reaction_add", timeout=self.client.timeout, check=check_reaction
)
except _base.TimeoutError:
except (_base.TimeoutError, TimeoutError):
raise NoResponseError
else:
return result
Expand All @@ -41,7 +42,7 @@ async def wait_for_message(self):
result = await self.client.wait_for(
"message", timeout=self.client.timeout, check=self._check_message
)
except _base.TimeoutError:
except (_base.TimeoutError, TimeoutError):
raise NoResponseError
else:
return result
Expand Down Expand Up @@ -97,7 +98,7 @@ async def wait_for_event(

try:
result = await self.client.wait_for(event, timeout=timeout, check=check)
except _base.TimeoutError:
except (_base.TimeoutError, TimeoutError):
raise NoResponseError
# TODO: What happens if the event is wrong / not valid?
else:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -9,7 +9,7 @@

setup(
name="distest",
version="0.5.0",
version="0.5.1",
description="Automate the testing of discord bots... With discord bots!",
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down

0 comments on commit 1d96b62

Please sign in to comment.