<commit_before>import pytest
from pyethereum import tester, utils, abi

serpent_contract = """
extern solidity: [sub:_:i]

def main(a):
    return(a.sub() * 2)

def sub():
    return(5)

"""

solidity_contract = """
contract foo {
    function main(address a) returns (int256 y) {
        y = a.sub() * 2;
    }
    function sub() returns (int256 y) {
        y = 7;
    }
}

"""


def test_interop():
    s = tester.state()
    c1 = s.abi_contract(serpent_contract)
    c2 = s.abi_contract(solidity_contract, language='solidity')
    assert c1.sub() == 5
    assert c2.sub() == 7
    assert c1.main(c2.address) == 14<commit_msg>Updated testcase<commit_after>import pytest
from pyethereum import tester, utils, abi

serpent_contract = """
extern solidity: [sub2:_:i]

def main(a):
    return(a.sub2() * 2)

def sub1():
    return(5)

"""

solidity_contract = """
contract serpent { function sub1() returns (int256 y) {} }

contract foo {
    function main(address a) returns (int256 y) {
        y = serpent(a).sub1() * 2;
    }
    function sub2() returns (int256 y) {
        y = 7;
    }
}

"""


def test_interop():
    s = tester.state()
    c1 = s.abi_contract(serpent_contract)
    c2 = s.abi_contract(solidity_contract, language='solidity')
    assert c1.sub1() == 5
    assert c2.sub2() == 7
    assert c1.main(c2.address) == 14
    print c2.main(c1.address, output='raw').encode('hex')
{'fraction_non_alphanumeric': 0.15268817204301074, 'fraction_numerical': 0.03799283154121864, 'mean_word_length': 3.117994100294985, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '624487', 'n_tokens_mistral': 544, 'n_tokens_neox': 513, 'n_words': 122}