Add unit tests for AsyncSubtensor methods#3200
Closed
codomposer wants to merge 1 commit intoopentensor:stagingfrom
Closed
Add unit tests for AsyncSubtensor methods#3200codomposer wants to merge 1 commit intoopentensor:stagingfrom
codomposer wants to merge 1 commit intoopentensor:stagingfrom
Conversation
- test_get_stake_with_locked_amount: Test locked vs unlocked stake amounts - test_sim_swap_accuracy: Test swap fee calculations - test_get_subnet_hyperparameters_caching: Test reuse_block parameter - test_compose_call_batch: Test batch call composition - test_sign_and_send_extrinsic_retry_on_network_error: Test network error handling - test_get_delegates_lite_vs_full: Test DelegateInfo vs DelegateInfoLite - test_query_runtime_api_error_handling: Test ChainError propagation
Collaborator
|
No actions for a week |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Add Unit Tests for AsyncSubtensor Methods
Description
This PR adds 7 new unit tests for the
AsyncSubtensorclass to improve test coverage for critical blockchain interaction methods.Changes
Added the following tests to
tests/unit_tests/test_async_subtensor.py:test_get_stake_with_locked_amounttest_sim_swap_accuracytest_get_subnet_hyperparameters_cachingtest_compose_call_batchtest_sign_and_send_extrinsic_retry_on_network_errortest_get_delegates_lite_vs_fulltest_query_runtime_api_error_handlingTesting
All tests pass:
source venv/bin/activate python -m pytest tests/unit_tests/test_async_subtensor.py::test_get_stake_with_locked_amount \ tests/unit_tests/test_async_subtensor.py::test_sim_swap_accuracy \ tests/unit_tests/test_async_subtensor.py::test_get_subnet_hyperparameters_caching \ tests/unit_tests/test_async_subtensor.py::test_compose_call_batch \ tests/unit_tests/test_async_subtensor.py::test_sign_and_send_extrinsic_retry_on_network_error \ tests/unit_tests/test_async_subtensor.py::test_get_delegates_lite_vs_full \ tests/unit_tests/test_async_subtensor.py::test_query_runtime_api_error_handling -vContribution by Gittensor, learn more at https://gittensor.io/