def test_backup_root():
    assert backup_root_from_config(
        'snapshot_root\t/just/a/little/test') == '/just/a/little/test'
    assert backup_root_from_config(
        'snapshot_root\t\t/other/test') == '/other/test'

    minimal_config = open('tests/rsnapshot-minimal.conf').read()
    assert backup_root_from_config(
        minimal_config) == '/rsnapshot/minimal/config/root/'
def test_backup_root_missing():
    with pytest.raises(ValueError) as excinfo:
        backup_root_from_config('')
    assert 'snapshot_root' in str(excinfo.value)
def test_backup_root_missing():
    with pytest.raises(ValueError) as excinfo:
        backup_root_from_config('')
    assert 'snapshot_root' in str(excinfo.value)
def test_backup_root():
    assert backup_root_from_config('snapshot_root\t/just/a/little/test') == '/just/a/little/test'
    assert backup_root_from_config('snapshot_root\t\t/other/test') == '/other/test'

    minimal_config = open('tests/rsnapshot-minimal.conf').read()
    assert backup_root_from_config(minimal_config) == '/rsnapshot/minimal/config/root/'