diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index 45a913f..0000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1,3 +0,0 @@ -# These are supported funding model platforms - -github: JakeCover diff --git a/.github/workflows/run_tests_matrix.yml b/.github/workflows/run_tests_matrix.yml index 0fad41b..e41de31 100644 --- a/.github/workflows/run_tests_matrix.yml +++ b/.github/workflows/run_tests_matrix.yml @@ -8,7 +8,7 @@ on: branches: [ develop ] jobs: - build: + build-matrix: runs-on: ubuntu-latest strategy: @@ -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 @@ -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 diff --git a/distest/TestInterface/_oddballs.py b/distest/TestInterface/_oddballs.py index e3fe373..174c91f 100644 --- a/distest/TestInterface/_oddballs.py +++ b/distest/TestInterface/_oddballs.py @@ -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 diff --git a/distest/TestInterface/_wait_for.py b/distest/TestInterface/_wait_for.py index 88886d1..cfe1cd9 100644 --- a/distest/TestInterface/_wait_for.py +++ b/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 @@ -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 @@ -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 @@ -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: diff --git a/setup.py b/setup.py index 6698aa3..f0b185a 100755 --- a/setup.py +++ b/setup.py @@ -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",