Ejemplo n.º 1
0
def test_emits_number():
    assert lua.to_lua(5) == '5'
Ejemplo n.º 2
0
def test_emits_variable_assignment():
    assert lua.to_lua(('var', 'value')) == 'var="value"'
Ejemplo n.º 3
0
def test_emits_string():
    assert lua.to_lua('python string') == '"python string"'
Ejemplo n.º 4
0
def test_emits_dictionary():
    expected = {'some_key': 'some-value', 'other_key': 42}
    for k, v in lua.from_lua('result = ' +
                             lua.to_lua(expected))['result'].items():
        assert expected[k] == v
Ejemplo n.º 5
0
def test_emits_number():
    assert lua.to_lua(5) == '5'
Ejemplo n.º 6
0
def test_emits_string():
    assert lua.to_lua('python string') == '"python string"'
Ejemplo n.º 7
0
def test_emits_variable_assignment():
    assert lua.to_lua(('var', 'value')) == 'var="value"'
Ejemplo n.º 8
0
def test_emits_dictionary():
    expected = {'some_key': 'some-value', 'other_key': 42}
    for k, v in lua.from_lua('result = ' + lua.to_lua(expected))['result'].items():
        assert expected[k] == v