Skip to content

Commit

Permalink
really drop python<=3.7 support (#264)
Browse files Browse the repository at this point in the history
Signed-off-by: Tomasz Kłoczko <[email protected]>
  • Loading branch information
kloczek committed May 6, 2024
1 parent 756b011 commit dd04802
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/test_watch.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def test_watch(tmp_path: Path, write_soon):
for changes in watch(tmp_path, debounce=50, step=10, watch_filter=None):
break

assert changes == {(Change.added, str((tmp_path / 'foo.txt')))}
assert changes == {(Change.added, str(tmp_path / 'foo.txt'))}


def test_wait_stop_event(tmp_path: Path, write_soon):
Expand All @@ -31,15 +31,15 @@ def test_wait_stop_event(tmp_path: Path, write_soon):

stop_event = threading.Event()
for changes in watch(tmp_path, debounce=50, step=10, watch_filter=None, stop_event=stop_event):
assert changes == {(Change.added, str((tmp_path / 'foo.txt')))}
assert changes == {(Change.added, str(tmp_path / 'foo.txt'))}
stop_event.set()


async def test_awatch(tmp_path: Path, write_soon):
sleep(0.05)
write_soon(tmp_path / 'foo.txt')
async for changes in awatch(tmp_path, debounce=50, step=10, watch_filter=None):
assert changes == {(Change.added, str((tmp_path / 'foo.txt')))}
assert changes == {(Change.added, str(tmp_path / 'foo.txt'))}
break


Expand All @@ -49,7 +49,7 @@ async def test_await_stop_event(tmp_path: Path, write_soon):
write_soon(tmp_path / 'foo.txt')
stop_event = anyio.Event()
async for changes in awatch(tmp_path, debounce=50, step=10, watch_filter=None, stop_event=stop_event):
assert changes == {(Change.added, str((tmp_path / 'foo.txt')))}
assert changes == {(Change.added, str(tmp_path / 'foo.txt'))}
stop_event.set()


Expand Down

0 comments on commit dd04802

Please sign in to comment.