Exemplo n.º 1
0
def test_splitfile_preprocessor_escaping():
    commands = preprocess(PARSING_TEST_SPLITFILE,
                          params={"TAG": "tag-v1-whatever"})
    print(commands)
    assert "${TAG}" not in commands
    assert "\\${ESCAPED}" not in commands
    assert "${ESCAPED}" in commands
    assert "tag-v1-whatever" in commands
Exemplo n.º 2
0
def test_splitfile_preprocessor_missing_params():
    with pytest.raises(SplitfileError) as e:
        preprocess(PARSING_TEST_SPLITFILE, params={})
    assert "${TAG}" in str(e.value)
    assert "${ESCAPED}" not in str(e.value)