Skip to content
Open
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
11 changes: 7 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,17 @@ jobs:
matrix:
# If changing how many times tests are run, must also change in codecov.yml
# to ensure test coverage is reported only after all tests have finished
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]

steps:
- name: "Checkout"
uses: "actions/checkout@v3"
- uses: "actions/setup-python@v5"
- name: Install uv and set the python version
uses: astral-sh/setup-uv@v6
with:
version: "0.6.17"
python-version: '${{ matrix.python-version }}'
activate-environment: true
- name: "Install bsdcpio"
run: |
./install-libarachive.sh
Expand All @@ -41,8 +44,8 @@ jobs:
pip install ".[dev,ci]"
- name: "Run type checking"
run: |
mypy stream_zip --strict
uv run mypy stream_zip --strict
- name: "Run tests"
run: |
pytest --cov
uv run pytest --cov
- uses: codecov/codecov-action@v3
2 changes: 1 addition & 1 deletion codecov.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
comment: false
codecov:
notify:
after_n_builds: 5
after_n_builds: 6
10 changes: 5 additions & 5 deletions test_stream_zip.py
Original file line number Diff line number Diff line change
Expand Up @@ -1386,7 +1386,7 @@ async def async_concat(chunks):
async def test():
assert b''.join(stream_zip(sync_files())) == await async_concat(async_stream_zip(async_files()))

asyncio.get_event_loop().run_until_complete(test())
asyncio.run(test())


def test_async_exception_propagates():
Expand All @@ -1405,7 +1405,7 @@ async def test():
pass

with pytest.raises(Exception, match='From generator'):
asyncio.get_event_loop().run_until_complete(test())
asyncio.run(test())


def test_async_exception_from_bytes_propagates():
Expand All @@ -1424,7 +1424,7 @@ async def test():
pass

with pytest.raises(Exception, match='From generator'):
asyncio.get_event_loop().run_until_complete(test())
asyncio.run(test())


def test_async_stream_zip_does_stream():
Expand All @@ -1446,7 +1446,7 @@ async def test():
async for chunk in async_stream_zip(async_files()):
state.append('out')

asyncio.get_event_loop().run_until_complete(test())
asyncio.run(test())
assert state == ['out', 'in', 'in', 'out', 'in', 'out', 'in', 'out', 'out']


Expand Down Expand Up @@ -1491,7 +1491,7 @@ async def test():
async for chunk in async_stream_zip(async_files()):
pass

asyncio.get_event_loop().run_until_complete(test())
asyncio.run(test())

assert var.get() == 'set-from-outer'
assert inner_files == 'set-from-outer'
Expand Down
Loading