Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

ported most of the serpent contracts from test_contracts.py to solidity #362

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

rubensayshi
Copy link
Contributor

figured since serpent is kinda being deprecated it would be nice to have all the tests in solidity (as well).
also added a few new ones for things that weren't covered yet.

test_subcall_suicider fails because #360

SOLIDITY_AVAILABLE = get_solidity() is not None


@pytest.mark.skipif(not SOLIDITY_AVAILABLE, reason='solc compiler not available')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be nice to roll this up into something reusable so that it isn't repeated for every test in the file.

skip_if_no_solidity_compiler = pytest.mark.skipif(not SOLIDITY_AVAILABLE, reason='solc compiler not available')

@skip_if_no_solidity_compiler
def test_things():
     ...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, though imo it shouldn't have that check considering solidity > serpent
but I guess the setup.py should install solc in that case ...

@rubensayshi rubensayshi force-pushed the solidity-tests branch 2 times, most recently from 6088bbd to 316b9b0 Compare June 21, 2016 11:11
@rubensayshi
Copy link
Contributor Author

added a bunch more;

  • refunds
  • fallback calls (contract testme { function() {} })
    and some variations (including recursive entry)

@joeykrug
Copy link
Contributor

Oh would love to merge once conflict fixed :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants