tests: fix clear_cache arg

This commit is contained in:
lilydjwg 2018-10-10 17:22:02 +08:00
parent 10e3478b12
commit e2fb91d3fb

View file

@ -23,11 +23,11 @@ class TestSource(Source):
self._future.set_exception(exc)
@pytest.fixture(scope="module")
async def run_source(*, clear_cache=False):
if clear_cache:
_cache.clear()
async def run_source():
async def __call__(conf, *, clear_cache=False):
if clear_cache:
_cache.clear()
async def __call__(conf):
future = asyncio.Future()
file = io.StringIO(conf)
file.name = '<StringIO>'