ethereum / beacon_chain

MIT License
209 stars 65 forks source link

Increase `beacon_chain/states` test coverage #126

Closed hwwhww closed 5 years ago

hwwhww commented 5 years ago

Current coverage:

Name                                             Stmts   Miss  Cover   Missing
------------------------------------------------------------------------------
beacon_chain/state/__init__.py                       0      0   100%
beacon_chain/state/active_state.py                  24      0   100%
beacon_chain/state/attestation_record.py            13      0   100%
beacon_chain/state/block.py                         20      0   100%
beacon_chain/state/chain.py                         23      1    96%   7
beacon_chain/state/config.py                        15      0   100%
beacon_chain/state/constants.py                      4      0   100%
beacon_chain/state/crosslink_record.py              12      0   100%
beacon_chain/state/crystallized_state.py            28      0   100%
beacon_chain/state/genesis_helpers.py               22      1    95%   26
beacon_chain/state/helpers.py                       98      7    93%   30-34, 38, 149
beacon_chain/state/partial_crosslink_record.py      12     12     0%   1-32
beacon_chain/state/recent_proposer_record.py        12      0   100%
beacon_chain/state/shard_and_committee.py           12      0   100%
beacon_chain/state/state_transition.py             194     14    93%   58-60, 82, 91, 102, 124, 130, 159, 169, 187, 212, 529, 554
beacon_chain/state/validator_record.py              12      0   100%
------------------------------------------------------------------------------
TOTAL                                              501     35    93%

TODO:

  1. Delete partial_crosslink_record.py
  2. Investigate the missing parts
p-mc2 commented 5 years ago

TODO 1.) is covered by #127

2.) I'm working on investigating the missing parts.

hwwhww commented 5 years ago

@Poseyy thank you! I solved helpers.py tests in Py-EVM, so you can just look at state_transition.py part.