mirror of
https://github.com/Dinnerbone/mcstatus.git
synced 2026-04-06 12:01:24 +08:00
Add asynchronous readers check
This commit is contained in:
13
mcstatus/tests/test_async_support.py
Normal file
13
mcstatus/tests/test_async_support.py
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
from unittest import TestCase
|
||||||
|
|
||||||
|
from inspect import iscoroutinefunction
|
||||||
|
|
||||||
|
from mcstatus.protocol.connection import TCPAsyncSocketConnection
|
||||||
|
|
||||||
|
class TCPAsyncSocketConnectionTests(TestCase):
|
||||||
|
def test_is_completely_asynchronous(self):
|
||||||
|
conn = TCPAsyncSocketConnection()
|
||||||
|
|
||||||
|
for attribute in dir(conn):
|
||||||
|
if attribute.startswith("read_"):
|
||||||
|
self.assertTrue(iscoroutinefunction(conn.__getattribute__(attribute)))
|
||||||
Reference in New Issue
Block a user