2018-10-10 09:34:06 +00:00
|
|
|
# MIT licensed
|
2020-08-17 07:11:14 +00:00
|
|
|
# Copyright (c) 2020 lilydjwg <lilydjwg@gmail.com>, et al.
|
2018-10-10 09:34:06 +00:00
|
|
|
|
|
|
|
import pytest
|
2024-11-03 10:29:19 +00:00
|
|
|
pytestmark = pytest.mark.asyncio
|
2018-10-10 09:34:06 +00:00
|
|
|
|
2020-08-17 07:11:14 +00:00
|
|
|
async def test_cache(run_str_multi):
|
|
|
|
conf = r'''
|
|
|
|
[cache-1]
|
|
|
|
source = "cmd"
|
2020-08-20 07:31:00 +00:00
|
|
|
cmd = "bash -c 'echo $RANDOM'"
|
2020-08-17 07:11:14 +00:00
|
|
|
|
|
|
|
[cache-2]
|
|
|
|
source = "cmd"
|
2020-08-20 07:31:00 +00:00
|
|
|
cmd = "bash -c 'echo $RANDOM'"
|
|
|
|
'''
|
2020-08-17 07:11:14 +00:00
|
|
|
|
|
|
|
r = await run_str_multi(conf)
|
|
|
|
assert r['cache-1'] == r['cache-2']
|