Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 5efcb3f

Browse files
committedAug 31, 2024
adapt to asyncgui 0.7.0
1 parent 0be08db commit 5efcb3f

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed
 

‎.github/workflows/python-package.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- name: Install dependencies
2525
run: |
2626
python -m pip install --upgrade pip
27-
python -m pip install pytest "asyncgui>=0.6,<0.7"
27+
python -m pip install pytest "asyncgui>=0.7,<0.8"
2828
python -m pip install .
2929
- name: Test with pytest
3030
run: make test

‎poetry.lock

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ packages = [
2525

2626
[tool.poetry.dependencies]
2727
python = "^3.10"
28-
asyncgui = "~0.6"
28+
asyncgui = ">=0.6"
2929

3030
[tool.poetry.group.dev.dependencies]
3131
pytest = "^7.4.3"

‎tests/clock/test_run_in_executor.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,22 +45,22 @@ async def job():
4545

4646
def test_cancel_before_getting_excuted(clock):
4747
import time
48-
from asyncgui import Event, start
48+
from asyncgui import Box, start
4949

50-
flag = Event()
50+
box = Box()
5151

5252
async def job():
53-
await clock.run_in_executor(executor, flag.set, polling_interval=0)
53+
await clock.run_in_executor(executor, box.put, polling_interval=0)
5454

5555
with ThreadPoolExecutor(max_workers=1) as executor:
5656
executor.submit(time.sleep, .1)
5757
task = start(job())
5858
time.sleep(.02)
5959
assert not task.finished
60-
assert not flag.is_set
60+
assert box.is_empty
6161
clock.tick(0)
6262
task.cancel()
6363
assert task.cancelled
64-
assert not flag.is_set
64+
assert box.is_empty
6565
time.sleep(.2)
66-
assert not flag.is_set
66+
assert box.is_empty

0 commit comments

Comments
 (0)
Please sign in to comment.