Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Mar 25, 2024
1 parent 4857134 commit 5abc79f
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 13 deletions.
10 changes: 5 additions & 5 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@

import pytest
from anyio import Event, create_task_group
from pycrdt import Array, Doc
from websockets import serve
from hypercorn import Config
from pycrdt import Array, Doc
from sniffio import current_async_library
from utils import ensure_server_running

from pycrdt_websocket import ASGIServer, WebsocketServer

from utils import ensure_server_running


class TestYDoc:
def __init__(self):
Expand Down Expand Up @@ -44,7 +42,9 @@ async def yws_server(request, unused_tcp_port):
from hypercorn.asyncio import serve
try:
async with create_task_group() as tg, websocket_server:
tg.start_soon(partial(serve, app, config, shutdown_trigger=shutdown_event.wait, mode="asgi"))
tg.start_soon(
partial(serve, app, config, shutdown_trigger=shutdown_event.wait, mode="asgi")
)
await ensure_server_running("localhost", unused_tcp_port)
yield unused_tcp_port
shutdown_event.set()
Expand Down
4 changes: 1 addition & 3 deletions tests/test_asgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@
from anyio import sleep
from httpx_ws import aconnect_ws
from pycrdt import Doc, Map

from pycrdt_websocket import WebsocketProvider

from utils import Websocket

from pycrdt_websocket import WebsocketProvider

pytestmark = pytest.mark.anyio

Expand Down
6 changes: 2 additions & 4 deletions tests/test_pycrdt_yjs.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@

import pytest
from anyio import Event, fail_after
from pycrdt import Array, Doc, Map
from httpx_ws import aconnect_ws

from pycrdt_websocket import WebsocketProvider

from pycrdt import Array, Doc, Map
from utils import Websocket, yjs_client

from pycrdt_websocket import WebsocketProvider

pytestmark = pytest.mark.anyio

Expand Down
1 change: 0 additions & 1 deletion tests/test_ystore.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

from pycrdt_websocket.ystore import SQLiteYStore, TempFileYStore


pytestmark = pytest.mark.anyio


Expand Down

0 comments on commit 5abc79f

Please sign in to comment.