Skip to content

Commit e2cf018

Browse files
committed
test: Test that cython coroutines have __qualname__ and __name__
1 parent aca2390 commit e2cf018

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/test_base.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,10 @@ class TestBaseUV(_TestBase, UVTestCase):
399399

400400
def test_cython_coro_is_coroutine(self):
401401
coro = self.loop.create_server(object)
402+
self.assertEqual(self.loop.create_server.__qualname__,
403+
'Loop.create_server')
404+
self.assertEqual(self.loop.create_server.__name__,
405+
'create_server')
402406
self.assertTrue(asyncio.iscoroutine(coro))
403407
fut = asyncio.ensure_future(coro, loop=self.loop)
404408
self.assertTrue(isinstance(fut, asyncio.Future))

0 commit comments

Comments
 (0)