Ejemplo n.º 1
0
def test_parse_referent(referent):
    ret = parse_bytecode(referent)
Ejemplo n.º 2
0
def test_file_input():
    with open(complete_test_file, 'r') as fp:
        src = fp.read()

    ret = parse_bytecode(src)
Ejemplo n.º 3
0
def test_parse_prolix_desc(prolix_desc):
    ret = parse_bytecode(prolix_desc)
Ejemplo n.º 4
0
def test_parse_badline_syntaxerror(badline):
    with pytest.raises(SyntaxError):
        ret = parse_bytecode(badline)
Ejemplo n.º 5
0
def test_parse_add_fragment_opname(add_fragment):
    ret = parse_bytecode(add_fragment)
    ret[2].opname == "BINARY_ADD"
Ejemplo n.º 6
0
def test_parse_add_fragment_offset(add_fragment):
    ret = parse_bytecode(add_fragment)
    ret[3].offset == 7
Ejemplo n.º 7
0
def test_parse_add_fragment_lineno(add_fragment):
    ret = parse_bytecode(add_fragment)
    ret[1].lineno == 2