nvchecker/tests/test_cache.py

20 lines
379 B
Python
Raw Normal View History

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
2023-12-09 11:17:31 +00:00
pytestmark = pytest.mark.asyncio(scope="session")
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']