2020-05-01 23:56:06 +08:00
|
|
|
"""Issue #7110"""
|
|
|
|
import asyncio
|
2020-05-01 19:40:17 +08:00
|
|
|
from typing import List
|
2020-05-01 23:56:06 +08:00
|
|
|
|
|
|
|
import asynctest
|
|
|
|
|
|
|
|
|
2020-05-01 19:40:17 +08:00
|
|
|
teardowns = [] # type: List[None]
|
2020-05-01 23:56:06 +08:00
|
|
|
|
|
|
|
|
|
|
|
class Test(asynctest.TestCase):
|
|
|
|
async def tearDown(self):
|
|
|
|
teardowns.append(None)
|
|
|
|
|
|
|
|
async def test_error(self):
|
|
|
|
await asyncio.sleep(0)
|
|
|
|
self.fail("failing on purpose")
|
|
|
|
|
|
|
|
async def test_ok(self):
|
|
|
|
await asyncio.sleep(0)
|
|
|
|
|
|
|
|
def test_teardowns(self):
|
|
|
|
assert len(teardowns) == 2
|