def test_groups(tempfiles):
    config = '''\
    files:
      - {dir}/dir/[ab].log
      - group1:
          - {dir}/[12].log
      - group2:
          - {dir}/3.log
    '''.format(dir=tempfiles.dir)
    cfg = parseconfig(textwrap.dedent(config))

    assert cfg['port'] == 8080
    assert cfg['addr'] == 'localhost'

    a1 = set((pjoin(tempfiles.dir, i) for i in ('dir/a.log', 'dir/b.log')))
    a2 = set(cfg['files']['__ungrouped__'])
    assert a1 == a2

    b1 = set((pjoin(tempfiles.dir, i) for i in ('1.log', '2.log')))
    b2 = set(cfg['files']['group1'])
    assert b1 == b2

    c1 = {pjoin(tempfiles.dir, '3.log')}
    c2 = set(cfg['files']['group2'])
    assert c1 == c2
dataset/ETHPy150Open gvalkov/tailon/tests/test_config.py/test_groups/original