示例#1
0
def test_invalid_padded_range_dup_fails():
    with pytest.raises(ParserException) as _:
        Host.expand_with(["{001..002..004}"])
示例#2
0
def test_padded_expand_range():
    assert ['001', '003'] == Host.expand_with(['{001..003/2}'])
示例#3
0
def test_invalid_range_dup_fails():
    with pytest.raises(ParserException) as _:
        Host.expand_with(["{1..2..4}"])
示例#4
0
def test_invalid_range_nonint_fails():
    with pytest.raises(ParserException) as e_info:
        Host.expand_with(['{1..cat}'])
示例#5
0
def test_expand_range():
    assert ['1', '3'] == Host.expand_with(['{1..3/2}'])
示例#6
0
def test_expand():
    assert ["1", "2", "3"] == Host.expand_with(["{1..3}"])
示例#7
0
def test_expand_range():
    assert ["1", "3"] == Host.expand_with(["{1..3/2}"])
示例#8
0
def test_invalid_padded_range_dup_fails():
    with pytest.raises(ParserException) as e_info:
        Host.expand_with(['{001..002..004}'])
示例#9
0
def test_invalid_padded_range_nonint_fails():
    with pytest.raises(ParserException) as e_info:
        Host.expand_with(['{001..cat}'])
示例#10
0
def test_expand_range():
    assert ['1', '3'] == Host.expand_with(['{1..3/2}'])
示例#11
0
def test_padded_expand_range():
    assert ['001', '003'] == Host.expand_with(['{001..003/2}'])
示例#12
0
def test_padded_expand():
    assert ['001', '002', '003'] == Host.expand_with(['{001..003}'])
示例#13
0
def test_expand():
    assert ['1', '2', '3'] == Host.expand_with(['{1..3}'])
示例#14
0
def test_invalid_range_empty():
    with pytest.raises(ParserException) as e_info:
        Host.expand_with(['{}'])
示例#15
0
def test_invalid_padded_range_nonint_fails():
    with pytest.raises(ParserException) as _:
        Host.expand_with(["{001..cat}"])
示例#16
0
def test_invalid_range_empty():
    with pytest.raises(ParserException) as e_info:
        Host.expand_with(['{}'])
示例#17
0
def test_invalid_range_empty():
    with pytest.raises(ParserException) as _:
        Host.expand_with(["{}"])
示例#18
0
def test_expand():
    assert ['1', '2', '3'] == Host.expand_with(['{1..3}'])
示例#19
0
def test_padded_expand():
    assert ["001", "002", "003"] == Host.expand_with(["{001..003}"])
示例#20
0
def test_padded_expand():
    assert ['001', '002', '003'] == Host.expand_with(['{001..003}'])
示例#21
0
def test_padded_expand_range():
    assert ["001", "003"] == Host.expand_with(["{001..003/2}"])
示例#22
0
def test_invalid_range_dup_fails():
    with pytest.raises(ParserException) as e_info:
        Host.expand_with(['{1..2..4}'])