-
Notifications
You must be signed in to change notification settings - Fork 998
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test case naming clean up #3143
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
720d1d9
Add @description decorator
hwwhww 0847a96
Unify test case naming style
hwwhww e5a0f7c
more clean ups
hwwhww 5111c22
Altair tests cleanup
hwwhww a66cf79
Clean up Altair and Bellatrix `process_deposit` tests
hwwhww 8e88c61
Clean up Bellatrix tests
hwwhww a5fd3f4
Clean up Capella tests
hwwhww 338806d
PR feedback from @ralexstokes
hwwhww 34907d2
Add comments on the deposit fork version tests
hwwhww 847c2bf
Remove `test_incorrect_sig_other_version` since it is duplicate to `t…
hwwhww e5709a5
Add `test_ineffective_deposit_with_current_fork_version`
hwwhww bfb9d84
Merge branch 'dev' into test-cases-clean-up
hwwhww File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
tests/core/pyspec/eth2spec/test/altair/block_processing/test_process_deposit.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
from eth2spec.test.context import ( | ||
spec_state_test, | ||
always_bls, | ||
with_phases, | ||
with_altair_and_later, | ||
) | ||
from eth2spec.test.helpers.constants import ( | ||
ALTAIR, | ||
) | ||
|
||
|
||
from eth2spec.test.helpers.deposits import ( | ||
run_deposit_processing_with_specific_fork_version, | ||
) | ||
|
||
|
||
@with_phases([ALTAIR]) | ||
@spec_state_test | ||
@always_bls | ||
def test_effective_deposit_with_previous_fork_version(spec, state): | ||
assert state.fork.previous_version != state.fork.current_version | ||
|
||
# It's only effective in Altair because the default `fork_version` of `compute_domain` is `GENESIS_FORK_VERSION`. | ||
# Therefore it's just a normal `DepositMessage`. | ||
yield from run_deposit_processing_with_specific_fork_version( | ||
spec, | ||
state, | ||
fork_version=state.fork.previous_version, | ||
) | ||
|
||
|
||
@with_altair_and_later | ||
hwwhww marked this conversation as resolved.
Show resolved
Hide resolved
|
||
@spec_state_test | ||
@always_bls | ||
def test_ineffective_deposit_with_current_fork_version(spec, state): | ||
yield from run_deposit_processing_with_specific_fork_version( | ||
spec, | ||
state, | ||
fork_version=state.fork.current_version, | ||
effective=False, | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can this be "altair and later"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, this is the control group of
bellatrix/block_processing/test_process_deposit.py::test_ineffective_deposit_with_previous_fork_version
. Altair's previous fork is exactly the correctGENESIS_FORK_VERSION
while others' are not.Added more comments (34907d2) and
current_fork_version
test case (e5709a5).