Skip to content

Commit 29da95e

Browse files
authored
Merge branch 'main' into feat/persist-peer-identity-312
2 parents cc75ee4 + 0c9ed25 commit 29da95e

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

newsfragments/1228.bugfix.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fixed PytestUnknownMarkWarning for the ``integration`` mark and RuntimeWarning from an unawaited coroutine in stream muxer tests, so CI runs without these warnings.

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,7 @@ markers = [
153153
"slow: mark test as slow",
154154
"flaky: mark test as flaky (may fail intermittently)",
155155
"benchmark: performance/sanity benchmarks (deselect with -m 'not benchmark')",
156+
"integration: mark test as integration (requires external service or proxy)",
156157
]
157158
xfail_strict = true
158159
trio_mode = true

tests/core/stream_muxer/test_muxer_multistream.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ async def test_new_conn_passes_timeout_to_multistream_client():
5454
mock_conn = MagicMock()
5555
mock_conn.is_initiator = True
5656
mock_peer_id = ID(b"test_peer")
57-
mock_communicator = MagicMock()
5857

5958
# Mock MultistreamClient and transports
6059
muxer = MuxerMultistream({}, negotiate_timeout=30)
@@ -65,9 +64,8 @@ async def test_new_conn_passes_timeout_to_multistream_client():
6564
await muxer.new_conn(mock_conn, mock_peer_id)
6665

6766
# Verify that select_one_of was called with the correct timeout
68-
muxer.multistream_client.select_one_of(
69-
tuple(muxer.transports.keys()), mock_communicator, 30
70-
)
67+
muxer.multistream_client.select_one_of.assert_called_once()
68+
assert muxer.multistream_client.select_one_of.call_args[0][2] == 30
7169

7270

7371
@pytest.mark.trio

0 commit comments

Comments
 (0)