Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing markers and opening rule violation #3725

Merged
merged 3 commits into from
Dec 14, 2024
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
9 changes: 9 additions & 0 deletions tests/channels/test_layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
pass


@pytest.mark.django_db

Check warning on line 61 in tests/channels/test_layers.py

View check run for this annotation

Codecov / codecov/patch

tests/channels/test_layers.py#L61

Added line #L61 was not covered by tests
async def test_channel_listen(ws: WebsocketCommunicator):
from channels.layers import get_channel_layer

Expand Down Expand Up @@ -107,6 +108,7 @@
await ws.send_json_to(CompleteMessage({"id": "sub1", "type": "complete"}))


@pytest.mark.django_db

Check warning on line 111 in tests/channels/test_layers.py

View check run for this annotation

Codecov / codecov/patch

tests/channels/test_layers.py#L111

Added line #L111 was not covered by tests
async def test_channel_listen_with_confirmation(ws: WebsocketCommunicator):
from channels.layers import get_channel_layer

Expand Down Expand Up @@ -162,6 +164,7 @@
await ws.send_json_to(CompleteMessage({"id": "sub1", "type": "complete"}))


@pytest.mark.django_db

Check warning on line 167 in tests/channels/test_layers.py

View check run for this annotation

Codecov / codecov/patch

tests/channels/test_layers.py#L167

Added line #L167 was not covered by tests
async def test_channel_listen_timeout(ws: WebsocketCommunicator):
from channels.layers import get_channel_layer

Expand Down Expand Up @@ -195,6 +198,7 @@
assert complete_message == {"id": "sub1", "type": "complete"}


@pytest.mark.django_db

Check warning on line 201 in tests/channels/test_layers.py

View check run for this annotation

Codecov / codecov/patch

tests/channels/test_layers.py#L201

Added line #L201 was not covered by tests
async def test_channel_listen_timeout_cm(ws: WebsocketCommunicator):
from channels.layers import get_channel_layer

Expand Down Expand Up @@ -234,6 +238,7 @@
assert complete_message == {"id": "sub1", "type": "complete"}


@pytest.mark.django_db

Check warning on line 241 in tests/channels/test_layers.py

View check run for this annotation

Codecov / codecov/patch

tests/channels/test_layers.py#L241

Added line #L241 was not covered by tests
async def test_channel_listen_no_message_on_channel(ws: WebsocketCommunicator):
from channels.layers import get_channel_layer

Expand Down Expand Up @@ -275,6 +280,7 @@
assert complete_message == {"id": "sub1", "type": "complete"}


@pytest.mark.django_db

Check warning on line 283 in tests/channels/test_layers.py

View check run for this annotation

Codecov / codecov/patch

tests/channels/test_layers.py#L283

Added line #L283 was not covered by tests
async def test_channel_listen_no_message_on_channel_cm(ws: WebsocketCommunicator):
from channels.layers import get_channel_layer

Expand Down Expand Up @@ -322,6 +328,7 @@
assert complete_message == {"id": "sub1", "type": "complete"}


@pytest.mark.django_db

Check warning on line 331 in tests/channels/test_layers.py

View check run for this annotation

Codecov / codecov/patch

tests/channels/test_layers.py#L331

Added line #L331 was not covered by tests
async def test_channel_listen_group(ws: WebsocketCommunicator):
from channels.layers import get_channel_layer

Expand Down Expand Up @@ -390,6 +397,7 @@
await ws.send_json_to(CompleteMessage({"id": "sub1", "type": "complete"}))


@pytest.mark.django_db

Check warning on line 400 in tests/channels/test_layers.py

View check run for this annotation

Codecov / codecov/patch

tests/channels/test_layers.py#L400

Added line #L400 was not covered by tests
async def test_channel_listen_group_cm(ws: WebsocketCommunicator):
from channels.layers import get_channel_layer

Expand Down Expand Up @@ -464,6 +472,7 @@
await ws.send_json_to(CompleteMessage({"id": "sub1", "type": "complete"}))


@pytest.mark.django_db

Check warning on line 475 in tests/channels/test_layers.py

View check run for this annotation

Codecov / codecov/patch

tests/channels/test_layers.py#L475

Added line #L475 was not covered by tests
async def test_channel_listen_group_twice(ws: WebsocketCommunicator):
from channels.layers import get_channel_layer

Expand Down
3 changes: 2 additions & 1 deletion tests/extensions/test_pyinstrument.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@


def test_basic_pyinstrument():
with tempfile.NamedTemporaryFile() as report_file:
with tempfile.NamedTemporaryFile(delete=False) as report_file:

Check warning on line 25 in tests/extensions/test_pyinstrument.py

View check run for this annotation

Codecov / codecov/patch

tests/extensions/test_pyinstrument.py#L25

Added line #L25 was not covered by tests
report_file_path = Path(report_file.name)

@strawberry.type
Expand All @@ -41,6 +41,7 @@
content = report_file_path.read_text("utf-8")

assert not result.errors
assert result.data

Check warning on line 44 in tests/extensions/test_pyinstrument.py

View check run for this annotation

Codecov / codecov/patch

tests/extensions/test_pyinstrument.py#L44

Added line #L44 was not covered by tests
assert result.data["theField"] == 4

assert "function_called_by_us_a" in content
Expand Down
Loading