Skip to content

Add the unit tests coverage report#80

Merged
lucas2brh merged 5 commits intomainfrom
feat/test-coverage
Jul 10, 2025
Merged

Add the unit tests coverage report#80
lucas2brh merged 5 commits intomainfrom
feat/test-coverage

Conversation

@bonnie57
Copy link
Contributor

@bonnie57 bonnie57 commented Jul 10, 2025

Description

  1. Import coverage.py to get the unit tests coverage report.
  2. Update the README on how to get the test report

How to run the command

  1. Run unit tests

    coverage run -m pytest tests/unit -v -ra -q
    
  2. Generating a Coverage Report

    coverage report

    or

     coverage html

Test Plan

Test result

image

bonnie57 and others added 5 commits July 8, 2025 17:40
- Updated test cases for `set_permission` and `set_all_permissions` methods to improve coverage.
- Added tests for handling unregistered IP accounts, invalid signer addresses, and invalid transaction addresses.
- Introduced tests for creating permission signatures with validation for deadlines.
- Enhanced error handling in tests to ensure proper exception messages are raised.
- Removed hardcoded chain ID values and replaced them with the CHAIN_ID constant for better maintainability.
- Improved formatting of error messages for environment variable checks.
- Cleaned up unnecessary code related to Python path adjustments.
Co-authored-by: bpolania <boris.polania@gmail.com>
Co-authored-by: bpolania <boris.polania@gmail.com>
- Introduced a new .coveragerc file to specify coverage settings, omitting certain files and directories.
- Updated README to include instructions for running tests with coverage and generating a coverage report.
@bonnie57 bonnie57 changed the base branch from main to feat/refactor-permission-unit-test July 10, 2025 08:24
@bonnie57 bonnie57 force-pushed the feat/refactor-permission-unit-test branch from 0ffdf21 to b20ee01 Compare July 10, 2025 08:25
Base automatically changed from feat/refactor-permission-unit-test to main July 10, 2025 13:06
@lucas2brh lucas2brh merged commit cb2a7da into main Jul 10, 2025
12 checks passed
@lucas2brh lucas2brh deleted the feat/test-coverage branch July 10, 2025 14:30
@bonnie57 bonnie57 restored the feat/test-coverage branch July 21, 2025 06:26
@bonnie57 bonnie57 deleted the feat/test-coverage branch August 5, 2025 03:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants