From 682a7a38d3b04115dc6827fcd02b155c3eea04a3 Mon Sep 17 00:00:00 2001 From: 5IGI0 <5IGI0@protonmail.com> Date: Fri, 30 Oct 2020 04:08:42 +0100 Subject: [PATCH] Add asynchronous readers check --- mcstatus/tests/test_async_support.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 mcstatus/tests/test_async_support.py diff --git a/mcstatus/tests/test_async_support.py b/mcstatus/tests/test_async_support.py new file mode 100644 index 0000000..ac74778 --- /dev/null +++ b/mcstatus/tests/test_async_support.py @@ -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))) \ No newline at end of file