File: test_flag.py

package info (click to toggle)
borgmatic 2.0.11-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,752 kB
  • sloc: python: 58,506; sh: 150; makefile: 8; javascript: 5
file content (20 lines) | stat: -rw-r--r-- 531 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
from borgmatic.commands.completion import flag as module


def test_variants_passes_through_non_list_index_flag_name():
    assert tuple(module.variants('foo')) == ('foo',)


def test_variants_broadcasts_list_index_flag_name_with_a_range_of_indices():
    assert tuple(module.variants('foo[0].bar')) == (
        'foo[0].bar',
        'foo[1].bar',
        'foo[2].bar',
        'foo[3].bar',
        'foo[4].bar',
        'foo[5].bar',
        'foo[6].bar',
        'foo[7].bar',
        'foo[8].bar',
        'foo[9].bar',
    )