Skip to content

Commit

Permalink
Skip some more things on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinkjt2000 committed Dec 8, 2021
1 parent 2672607 commit a31e808
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
9 changes: 5 additions & 4 deletions mcstatus/tests/test_timeout.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import asyncio
from asyncio import StreamReader
from mock import patch
import sys

import asyncio
import pytest
from mock import patch

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)
Expand All @@ -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()
Expand Down
1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ commands =
pytest {posargs}

[testenv:check]
platform = linux2|darwin
commands =
black --check -l 127 ./mcstatus
pytype ./mcstatus
Expand Down

0 comments on commit a31e808

Please sign in to comment.