コード例 #1
0
ファイル: test_traject.py プロジェクト: blaflamme/morepath
def test_parse_variables():
    assert parse_variables('No variables') == []
    assert parse_variables('The {foo} is the {bar}.') == ['foo', 'bar']
    with pytest.raises(TrajectError):
        parse_variables('{}')
    with pytest.raises(TrajectError):
        parse_variables('{1illegal}')
コード例 #2
0
ファイル: test_traject.py プロジェクト: reinout/morepath
def test_parse_variables():
    assert parse_variables("No variables") == []
    assert parse_variables("The {foo} is the {bar}.") == ["foo", "bar"]
    with pytest.raises(TrajectError):
        parse_variables("{}")
    with pytest.raises(TrajectError):
        parse_variables("{1illegal}")
コード例 #3
0
def test_parse_variables():
    assert parse_variables("No variables") == []
    assert parse_variables("The {foo} is the {bar}.") == ["foo", "bar"]
    with pytest.raises(TrajectError):
        parse_variables("{}")
    with pytest.raises(TrajectError):
        parse_variables("{1illegal}")
コード例 #4
0
def test_parse_variables():
    assert parse_variables('No variables') == []
    assert parse_variables('The {foo} is the {bar}.') == ['foo', 'bar']
    with pytest.raises(TrajectError):
        parse_variables('{}')
    with pytest.raises(TrajectError):
        parse_variables('{1illegal}')
コード例 #5
0
ファイル: test_traject.py プロジェクト: oohlaf/morepath
def test_parse_variables():
    assert parse_variables('No variables') == []
    assert parse_variables('The {foo} is the {bar}.') == ['foo', 'bar']
    assert parse_variables('{}') == ['']