Skip to content

Commit

Permalink
fixtures: update to 61185fe4b8762118fe9ee318539683b47cb04ed6 + mark R…
Browse files Browse the repository at this point in the history
…evertInCreateInInit as xfail.

Rolls forwards up to 2018-03-01.

Break in `RevertInCreateInInit.json` determined by
`git bisect run`.

The test is marked `xfail` to expicitly highlight the fact. This is
done in 3 places - all are run as part of CI.
  • Loading branch information
veox committed Sep 9, 2018
1 parent 7752f05 commit bdfba46
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 2 deletions.
2 changes: 1 addition & 1 deletion fixtures
Submodule fixtures updated 13999 files
18 changes: 17 additions & 1 deletion tests/json-fixtures/test_blockchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,33 @@
BASE_FIXTURE_PATH = os.path.join(ROOT_PROJECT_DIR, 'fixtures', 'BlockchainTests')


# These are tests that are thought to be incorrect or buggy upstream,
# at the commit currently checked out in submodule `fixtures`.
# Ideally, this list should be empty.
# WHEN ADDING ENTRIES, ALWAYS PROVIDE AN EXPLANATION!
INCORRECT_UPSTREAM_TESTS = {
# The test considers a "synthetic" scenario (the state described there can't
# be arrived at using regular consensus rules).
# * https://github.com/ethereum/py-evm/pull/1224#issuecomment-418775512
# The result is in conflict with the yellow-paper:
# * https://github.com/ethereum/py-evm/pull/1224#issuecomment-418800369
('GeneralStateTests/stRevertTest/RevertInCreateInInit_d0g0v0.json', 'RevertInCreateInInit_d0g0v0_Byzantium'), # noqa: E501
}


def blockchain_fixture_mark_fn(fixture_path, fixture_name):
if fixture_path.startswith('bcExploitTest'):
return pytest.mark.skip("Exploit tests are slow")
elif fixture_path == 'bcWalletTest/walletReorganizeOwners.json':
return pytest.mark.skip("Wallet owner reorganization tests are slow")
elif (fixture_path, fixture_name) in INCORRECT_UPSTREAM_TESTS:
return pytest.mark.xfail(reason="Listed in INCORRECT_UPSTREAM_TESTS.")


def blockchain_fixture_ignore_fn(fixture_path, fixture_name):
if fixture_path.startswith('GeneralStateTests'):
# General state tests are also exported as blockchain tests. We
# skip them here so we don't run them twice"
# skip them here so we don't run them twice
return True


Expand Down
6 changes: 6 additions & 0 deletions tests/json-fixtures/test_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,12 @@ def expand_fixtures_forks(all_fixtures):
# Ideally, this list should be empty.
# WHEN ADDING ENTRIES, ALWAYS PROVIDE AN EXPLANATION!
INCORRECT_UPSTREAM_TESTS = {
# The test considers a "synthetic" scenario (the state described there can't
# be arrived at using regular consensus rules).
# * https://github.com/ethereum/py-evm/pull/1224#issuecomment-418775512
# The result is in conflict with the yellow-paper:
# * https://github.com/ethereum/py-evm/pull/1224#issuecomment-418800369
('stRevertTest/RevertInCreateInInit.json', 'RevertInCreateInInit', 'Byzantium', 0),
}


Expand Down
16 changes: 16 additions & 0 deletions tests/trinity/json-fixtures-over-rpc/test_rpc_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,20 @@
'DelegateCallSpam_EIP150',
)

# These are tests that are thought to be incorrect or buggy upstream,
# at the commit currently checked out in submodule `fixtures`.
# Ideally, this list should be empty.
# WHEN ADDING ENTRIES, ALWAYS PROVIDE AN EXPLANATION!
INCORRECT_UPSTREAM_TESTS = {
# The test considers a "synthetic" scenario (the state described there can't
# be arrived at using regular consensus rules).
# * https://github.com/ethereum/py-evm/pull/1224#issuecomment-418775512
# The result is in conflict with the yellow-paper:
# * https://github.com/ethereum/py-evm/pull/1224#issuecomment-418800369
('GeneralStateTests/stRevertTest/RevertInCreateInInit_d0g0v0.json', 'RevertInCreateInInit_d0g0v0_Byzantium-Chain'), # noqa: E501
('GeneralStateTests/stRevertTest/RevertInCreateInInit_d0g0v0.json', 'RevertInCreateInInit_d0g0v0_Byzantium-MiningChain'), # noqa: E501
}

RPC_STATE_NORMALIZERS = {
'balance': remove_leading_zeros,
'code': empty_to_0x,
Expand Down Expand Up @@ -162,6 +176,8 @@ def blockchain_fixture_mark_fn(fixture_path, fixture_name):
if not should_run_slow_tests():
return pytest.mark.skip("skipping slow test on a quick run")
break
if (fixture_path, fixture_name) in INCORRECT_UPSTREAM_TESTS:
return pytest.mark.xfail(reason="Listed in INCORRECT_UPSTREAM_TESTS.")


def pytest_generate_tests(metafunc):
Expand Down

0 comments on commit bdfba46

Please sign in to comment.