Skip to content

Commit e720240

Browse files
committed
change CRLF to LF
1 parent a4adf6a commit e720240

File tree

8 files changed

+6196
-6196
lines changed

8 files changed

+6196
-6196
lines changed

quarkchain/cluster/master.py

Lines changed: 1913 additions & 1913 deletions
Large diffs are not rendered by default.

quarkchain/cluster/miner.py

Lines changed: 461 additions & 461 deletions
Large diffs are not rendered by default.

quarkchain/cluster/shard.py

Lines changed: 916 additions & 916 deletions
Large diffs are not rendered by default.

quarkchain/cluster/simple_network.py

Lines changed: 523 additions & 523 deletions
Large diffs are not rendered by default.

quarkchain/cluster/slave.py

Lines changed: 1499 additions & 1499 deletions
Large diffs are not rendered by default.
Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
import asyncio
2-
3-
import pytest
4-
5-
from quarkchain.protocol import AbstractConnection
6-
from quarkchain.utils import _get_or_create_event_loop
7-
8-
9-
@pytest.fixture(autouse=True)
10-
def cleanup_event_loop():
11-
"""Cancel all pending asyncio tasks after each test to prevent inter-test contamination."""
12-
yield
13-
loop = _get_or_create_event_loop()
14-
# Multiple rounds of cleanup: cancelling tasks can spawn new tasks in finally blocks
15-
for _ in range(3):
16-
pending = [t for t in asyncio.all_tasks(loop) if not t.done()]
17-
if not pending:
18-
break
19-
for task in pending:
20-
task.cancel()
21-
loop.run_until_complete(asyncio.gather(*pending, return_exceptions=True))
22-
# Let the loop process any callbacks triggered by cancellation
23-
loop.run_until_complete(asyncio.sleep(0))
24-
AbstractConnection.aborted_rpc_count = 0
1+
import asyncio
2+
3+
import pytest
4+
5+
from quarkchain.protocol import AbstractConnection
6+
from quarkchain.utils import _get_or_create_event_loop
7+
8+
9+
@pytest.fixture(autouse=True)
10+
def cleanup_event_loop():
11+
"""Cancel all pending asyncio tasks after each test to prevent inter-test contamination."""
12+
yield
13+
loop = _get_or_create_event_loop()
14+
# Multiple rounds of cleanup: cancelling tasks can spawn new tasks in finally blocks
15+
for _ in range(3):
16+
pending = [t for t in asyncio.all_tasks(loop) if not t.done()]
17+
if not pending:
18+
break
19+
for task in pending:
20+
task.cancel()
21+
loop.run_until_complete(asyncio.gather(*pending, return_exceptions=True))
22+
# Let the loop process any callbacks triggered by cancellation
23+
loop.run_until_complete(asyncio.sleep(0))
24+
AbstractConnection.aborted_rpc_count = 0

0 commit comments

Comments
 (0)