diff --git a/tests/conftest.py b/tests/conftest.py index 1763d01..bddf44a 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -43,7 +43,10 @@ async def get_version(): async def __call__(name, config): if isinstance(config, dict): - _config = configparser.ConfigParser(dict_type=dict, allow_no_value=True) + _config = configparser.ConfigParser( + dict_type=dict, allow_no_value=True, + interpolation=None, + ) _config.read_dict({name: config}) config = _config[name] diff --git a/tests/test_cmd.py b/tests/test_cmd.py index 336f126..326f33d 100644 --- a/tests/test_cmd.py +++ b/tests/test_cmd.py @@ -1,6 +1,7 @@ # MIT licensed # Copyright (c) 2013-2017 lilydjwg , et al. +import time import pytest pytestmark = pytest.mark.asyncio @@ -9,3 +10,12 @@ async def test_cmd(get_version): async def test_cmd_complex(get_version): assert await get_version("example", {"cmd": "echo Meow | sed 's/meow/woof/i'"}) == "woof" + +async def test_cmd_with_percent(run_source): + test_conf = '''\ +[example] +cmd = date +%Y-%m-%d''' + date = await run_source(test_conf) + expected = time.strftime('%Y-%m-%d') + assert date == expected +