Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 2 additions & 22 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@ on:
pull_request:

jobs:
# Full test suite. asynctest does not work on Python 3.11+
# (asyncio.coroutine was removed), so tests run on 3.8-3.10 only.
test:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10"]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
Expand All @@ -22,24 +20,6 @@ jobs:
- name: Install package and test dependencies
run: |
pip install .
pip install asynctest pytest pytest-mock pyyaml jsonschema
pip install pytest pytest-mock pyyaml jsonschema
- name: Run tests
run: pytest -vv

# Import smoke test on newer Pythons where the test suite cannot run.
import-check:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install package
run: pip install .
- name: Import check
working-directory: ${{ runner.temp }}
run: python -c "from obniz import Obniz; print('import OK')"
1 change: 0 additions & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ attrdict3 = "==2.0.2"
semver = "==2.8.1"

[dev-packages]
asynctest = "*"
# "black" requires python 3.6+
# so if it exists in Pipfile, `pipenv insttall` must fail on Travis CI python 3.5
# please install by your self via `pipenv run pip install black`
Expand Down
25 changes: 4 additions & 21 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions tests/utils.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import asyncio
import json
from unittest.mock import AsyncMock

import asynctest
import pytest
import websockets

Expand All @@ -27,7 +27,7 @@ def setup_obniz(mocker):

stub = mocker.MagicMock(buffered_amount=0)
# stub.on = mocker.stub()
stub.send = asynctest.CoroutineMock()
stub.send = AsyncMock()
# stub.close = mocker.stub()
# stub.removeAllListeners = mocker.stub()

Expand Down
6 changes: 1 addition & 5 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,13 @@
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.

# Note: the test suite depends on asynctest, which does not work on
# Python 3.11+ (asyncio.coroutine was removed). Runtime supports 3.8+,
# but tests can only run on 3.8-3.10 until asynctest is replaced.
[tox]
envlist = py38, py39, py310
envlist = py38, py39, py310, py311, py312, py313

[testenv]
deps =
pytest
pytest-mock
asynctest
pyyaml
jsonschema
commands =
Expand Down
Loading