thenewboston-blockchain / thenewboston-python

Python library for thenewboston digital currency.
https://thenewboston.com
MIT License
104 stars 35 forks source link

Improve test coverage #69

Open buckyroberts opened 3 years ago

buckyroberts commented 3 years ago

Improve overall test coverage for this repo. We can split this issue up into multiple smaller issues as well.

DucPhamTV commented 3 years ago

I can work on this.

DucPhamTV commented 3 years ago

List of modules that haven't been 100% test coverage.

Name                                                              Stmts   Miss Branch BrPart     Cover                                                
------------------------------------------------------------------------------------------------------
src/thenewboston/argparser/validators.py                             68     68     22      0     0.00%                                                
src/thenewboston/base_classes/fetch_primary_validator_config.py      72     72     18      0     0.00%                                                
src/thenewboston/base_classes/initialize_node.py                    135    135     48      0     0.00%                                                
src/thenewboston/blocks/signatures.py                                 8      3      0      0    62.50%                                                
src/thenewboston/constants/clean.py                                   5      5      0      0     0.00%                                                
src/thenewboston/constants/crawl.py                                   5      5      0      0     0.00%                                                
src/thenewboston/constants/errors.py                                  3      3      0      0     0.00%                                                
src/thenewboston/environment/environment_variables.py                 7      7      0      0     0.00%
src/thenewboston/models/confirmation_service.py                       9      9      0      0     0.00%
src/thenewboston/models/created_modified.py                           6      6      0      0     0.00%
src/thenewboston/models/network_node.py                              17     17      0      0     0.00%
src/thenewboston/models/network_transaction.py                       11     11      0      0     0.00%
src/thenewboston/models/network_validator.py                         10     10      0      0     0.00%
src/thenewboston/serializers/account_balance.py                       9      9      0      0     0.00%
src/thenewboston/serializers/configuration.py                        15     15      0      0     0.00%
src/thenewboston/serializers/confirmation_block_message.py           12     12      0      0     0.00%
src/thenewboston/serializers/message.py                              16     16      2      0     0.00%
src/thenewboston/serializers/network_block.py                        42     42     18      0     0.00%
src/thenewboston/serializers/network_transaction.py                  26     26      2      0     0.00%
src/thenewboston/serializers/primary_validator.py                    17     17      0      0     0.00%
src/thenewboston/third_party/django_redis/pool.py                     4      4      0      0     0.00%                                                
src/thenewboston/third_party/factory/utils.py                         3      3      0      0     0.00%                                                                              
src/thenewboston/third_party/pytest/asserts.py                        6      6      6      0     0.00%                                                
src/thenewboston/third_party/pytest/client.py                        49     49      2      0     0.00%                                                                                       
src/thenewboston/transactions/validation.py                           4      4      4      0     0.00%                                                
src/thenewboston/utils/exceptions.py                                  2      2      0      0     0.00%
src/thenewboston/utils/fields.py                                      9      9      4      0     0.00%
src/thenewboston/utils/files.py                                      25     25      2      0     0.00%
src/thenewboston/utils/format.py                                      3      3      0      0     0.00%
src/thenewboston/utils/messages.py                                    4      4      0      0     0.00%
src/thenewboston/utils/network.py                                    16     16      2      0     0.00%
src/thenewboston/utils/serializers.py                                 5      5      4      0     0.00%
src/thenewboston/utils/signed_requests.py                             7      7      0      0     0.00%
src/thenewboston/utils/validators.py                                 10     10      6      0     0.00%
src/thenewboston/verify_keys/verify_key.py                           10      4      4      1    50.00%

We can split this issue into smaller issues by packages. Some packages like models, constants I haven't had ideas how to test them.

achalpatel commented 3 years ago

I am not sure but shouldn't the method verify_signature(*, message, signature, verify_key): return Boolean? Location : src/thenewboston/blocks/signatures.py