How to use the vyper.compiler.compile_code function in vyper

To help you get started, we’ve selected a few vyper examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github vyperlang / vyper / tests / parser / syntax / test_constants.py View on Github external
def test_constant_success(good_code):
    assert compiler.compile_code(good_code) is not None
github vyperlang / vyper / tests / parser / exceptions / test_variable_declaration_exception.py View on Github external
def test_variable_declaration_exception(bad_code):
    with raises(VariableDeclarationException):
        compiler.compile_code(bad_code)
github vyperlang / vyper / tests / parser / syntax / utils / test_variable_names.py View on Github external
def test_varname_validity_success(good_code):
    assert compiler.compile_code(good_code) is not None
github vyperlang / vyper / tests / parser / syntax / test_invalids.py View on Github external
def test_compilation_fails_with_exception(bad_code, exception_type):
    with raises(exception_type):
        compiler.compile_code(bad_code)
github vyperlang / vyper / tests / parser / syntax / test_chainid.py View on Github external
def test_chain_success(good_code):
    assert compiler.compile_code(good_code) is not None
github vyperlang / vyper / tests / parser / syntax / test_bytes.py View on Github external
def test_bytes_fail(bad_code):
    if isinstance(bad_code, tuple):
        with raises(bad_code[1]):
            compiler.compile_code(bad_code[0])
    else:
        with raises(TypeMismatchException):
            compiler.compile_code(bad_code)
github vyperlang / vyper / tests / parser / syntax / test_tuple_assign.py View on Github external
def test_tuple_assign_fail(bad_code):
    if isinstance(bad_code, tuple):
        with raises(bad_code[1]):
            compiler.compile_code(bad_code[0])
    else:
        with raises(TypeMismatchException):
            compiler.compile_code(bad_code)
github vyperlang / vyper / tests / parser / syntax / test_send.py View on Github external
def test_block_success(good_code):
    assert compiler.compile_code(good_code) is not None
github vyperlang / vyper / tests / parser / syntax / test_list.py View on Github external
def test_list_success(good_code):
    assert compiler.compile_code(good_code) is not None
github vyperlang / vyper / tests / parser / exceptions / test_type_mismatch_exception.py View on Github external
def test_type_mismatch_exception(bad_code):
    with raises(TypeMismatchException):
        compiler.compile_code(bad_code)