Skip to content

Commit

Permalink
tests/test_state_fixtures(): bump fixtures and mark new test xfail.
Browse files Browse the repository at this point in the history
The upstream generated test is not sufficiently specific, and it's hard
to determine which of the two implementations is incorrect.

The principal author of the test case (Yoichi Hirai, github @pirapira)
seems currently unavailable, so it's difficult for me to get specific
details.
  • Loading branch information
veox committed Sep 3, 2018
1 parent 3fef4bd commit 1d8d470
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
15 changes: 15 additions & 0 deletions tests/json-fixtures/test_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,19 @@ def expand_fixtures_forks(all_fixtures):
}


# 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 = {
# Upstream seems to specify that the precompile call fails, but `py-evm`
# handles it just fine.
# * https://github.com/ethereum/py-evm/pull/1224#issuecomment-417351843
# * https://github.com/ethereum/tests/pull/405#issuecomment-417855812
('stReturnDataTest/modexp_modsize0_returndatasize.json', 'modexp_modsize0_returndatasize', 'Byzantium', 4),
}


def mark_statetest_fixtures(fixture_path, fixture_key, fixture_fork, fixture_index):
fixture_id = (fixture_path, fixture_key, fixture_fork, fixture_index)
if fixture_path.startswith('stTransactionTest/zeroSigTransa'):
Expand All @@ -144,6 +157,8 @@ def mark_statetest_fixtures(fixture_path, fixture_key, fixture_fork, fixture_ind
return pytest.mark.skip("Skipping slow test")
elif fixture_path.startswith('stQuadraticComplexityTest'):
return pytest.mark.skip("Skipping slow test")
elif fixture_id 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 1d8d470

Please sign in to comment.