mirror of
https://github.com/Dinnerbone/mcstatus.git
synced 2026-04-05 11:31:23 +08:00
Skip some more things on Windows
This commit is contained in:
@@ -1,13 +1,13 @@
|
||||
import asyncio
|
||||
from asyncio import StreamReader
|
||||
|
||||
import pytest
|
||||
from mock import patch
|
||||
import sys
|
||||
|
||||
import asyncio
|
||||
import pytest
|
||||
|
||||
from mcstatus.protocol.connection import TCPAsyncSocketConnection
|
||||
|
||||
|
||||
class FakeAsyncStream(StreamReader):
|
||||
class FakeAsyncStream(asyncio.StreamReader):
|
||||
async def read(self, n: int) -> bytes:
|
||||
await asyncio.sleep(delay=2)
|
||||
return bytes([0] * n)
|
||||
@@ -17,6 +17,7 @@ def fake_asyncio_asyncio_open_connection(hostname, port):
|
||||
return FakeAsyncStream(), None
|
||||
|
||||
|
||||
@pytest.mark.skipif(sys.platform.startswith("win"), reason="async bug on Windows https://github.com/Dinnerbone/mcstatus/issues/140")
|
||||
class TestAsyncSocketConnection:
|
||||
def setup_method(self):
|
||||
self.tcp_async_socket = TCPAsyncSocketConnection()
|
||||
|
||||
Reference in New Issue
Block a user