How to use the borgmatic.borg.create._make_exclude_flags function in borgmatic

To help you get started, we’ve selected a few borgmatic examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github witten / borgmatic / tests / unit / borg / test_create.py View on Github external
def test_make_exclude_flags_includes_exclude_nodump_when_true_in_config():
    exclude_flags = module._make_exclude_flags(location_config={'exclude_nodump': True})

    assert exclude_flags == ('--exclude-nodump',)
github witten / borgmatic / tests / unit / borg / test_create.py View on Github external
def test_make_exclude_flags_includes_exclude_from_filenames_when_in_config():

    exclude_flags = module._make_exclude_flags(
        location_config={'exclude_from': ['excludes', 'other']}
    )

    assert exclude_flags == ('--exclude-from', 'excludes', '--exclude-from', 'other')
github witten / borgmatic / tests / unit / borg / test_create.py View on Github external
def test_make_exclude_flags_does_not_include_exclude_caches_when_false_in_config():
    exclude_flags = module._make_exclude_flags(location_config={'exclude_caches': False})

    assert exclude_flags == ()
github witten / borgmatic / tests / unit / borg / test_create.py View on Github external
def test_make_exclude_flags_includes_exclude_patterns_filename_when_given():
    exclude_flags = module._make_exclude_flags(
        location_config={'exclude_patterns': ['*.pyc', '/var']}, exclude_filename='/tmp/excludes'
    )

    assert exclude_flags == ('--exclude-from', '/tmp/excludes')
github witten / borgmatic / tests / unit / borg / test_create.py View on Github external
def test_make_exclude_flags_includes_exclude_if_present_when_in_config():
    exclude_flags = module._make_exclude_flags(location_config={'exclude_if_present': 'exclude_me'})

    assert exclude_flags == ('--exclude-if-present', 'exclude_me')
github witten / borgmatic / tests / unit / borg / test_create.py View on Github external
def test_make_exclude_flags_does_not_include_exclude_nodump_when_false_in_config():
    exclude_flags = module._make_exclude_flags(location_config={'exclude_nodump': False})

    assert exclude_flags == ()
github witten / borgmatic / tests / unit / borg / test_create.py View on Github external
def test_make_exclude_flags_includes_exclude_caches_when_true_in_config():
    exclude_flags = module._make_exclude_flags(location_config={'exclude_caches': True})

    assert exclude_flags == ('--exclude-caches',)
github witten / borgmatic / tests / unit / borg / test_create.py View on Github external
def test_make_exclude_flags_includes_both_filenames_when_patterns_given_and_exclude_from_in_config():
    exclude_flags = module._make_exclude_flags(
        location_config={'exclude_from': ['excludes']}, exclude_filename='/tmp/excludes'
    )

    assert exclude_flags == ('--exclude-from', 'excludes', '--exclude-from', '/tmp/excludes')
github witten / borgmatic / tests / unit / borg / test_create.py View on Github external
def test_make_exclude_flags_includes_keep_exclude_tags_when_true_in_config():
    exclude_flags = module._make_exclude_flags(location_config={'keep_exclude_tags': True})

    assert exclude_flags == ('--keep-exclude-tags',)