

def test_simple(tempfiles):
    config = '    bind: 0.0.0.0:8080\n    allow-transfers: true\n    files:\n      - {dir}/*.log\n      - {dir}/dir/[abc].log\n    '.format(dir=tempfiles.dir)
    cfg = parseconfig(textwrap.dedent(config))
    a1 = set(tempfiles.files)
    a1.discard(pjoin(tempfiles.dir, 'dir/c.log'))
    a2 = set(cfg['files']['__ungrouped__'])
    assert (a1 == a2)
    assert (cfg['port'] == 8080)
    assert (cfg['addr'] == '0.0.0.0')
    assert (cfg['allow-transfers'] is True)

dataset/ETHPy150Open gvalkov/tailon/tests/test_config.py test_simple/original