Пример #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}'])