Skip to content

Commit

Permalink
Merge pull request #63 from devolo/fix_tests
Browse files Browse the repository at this point in the history
Fix tests
  • Loading branch information
2Fake authored Nov 29, 2024
2 parents f8f1062 + 79a8313 commit 602aa00
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- name: Checkout sources
uses: actions/[email protected]
Expand Down
11 changes: 0 additions & 11 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,3 @@ def test_data_fixture(request):
with file.open("r") as fh:
test_data = json.load(fh)
setattr(request.cls, filename, test_data)


@pytest.fixture()
def event_loop():
loop = asyncio.get_event_loop()
yield loop
to_cancel = asyncio.tasks.all_tasks(loop)
for task in to_cancel:
task.cancel()
loop.run_until_complete(asyncio.tasks.gather(*to_cancel, return_exceptions=True))
loop.close()
2 changes: 2 additions & 0 deletions tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ async def test_api(self, request, httpx_mock):
httpx_mock.add_response(json=request.cls.info)
r = await _Api()._call("") # pylint: disable=protected-access
assert r.json() == request.cls.info

httpx_mock.add_response(json=request.cls.info)
client = AsyncClient()
r = await _Api(client)._call("") # pylint: disable=protected-access
await client.aclose()
Expand Down

0 comments on commit 602aa00

Please sign in to comment.