Repository navigation
Conversation
Add comprehensive CLI test suite for rustchain_sdk.cli using pytest and click testing.
This workflow runs tests for the Python SDK CLI on push and pull request events for specific paths. It supports multiple Python versions and installs development dependencies before executing the test suite.
Contributor
|
Welcome to RustChain! Thanks for your first pull request. Before we review, please make sure:
Bounty tiers: Micro (1-10 RTC) | Standard (20-50) | Major (75-100) | Critical (100-150) A maintainer will review your PR soon. Thanks for contributing! |
Contributor
|
This PR is quite large (XL). Consider splitting into smaller, focused PRs for faster review. Large PRs take longer to review and have higher risk of issues. |
This branch has not been deployed
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.
Closes Scottcjn/rustchain-bounties#17181
Summary
Adds
sdk/python/tests/test_cli.py— aclick.testing.CliRunnersuite forrustchain_sdk/cli.py, which previously had no tests.httpx.MockTransport(part of httpx), soRustChainClient's own error mapping, redirect refusal and JSON handling are exercised end-to-end.socket.connect/create_connection/getaddrinfo.wallet sendverifies the Ed25519 signature against the canonical message;attestchecks the submitted signature over the challenge.xfail(strict=True, reason="Rustchain#NNNN"). No fixes are included, as the bounty requests..github/workflows/sdk-python-cli.yml(Python 3.9 + 3.12) andsdk/python/requirements-dev.txt.Command → test mapping
--json--version,--helptest_version,test_help[*]test_unknown_command_failswallet createtest_wallet_create_humantest_wallet_create_json[12/24]test_wallet_create_rejects_bad_word_count,…_non_integer_wordswallet balancetest_wallet_balance_human,…_node_url_is_usedtest_wallet_balance_json…_missing_address, unreachable / 4xx / 5xx / non-JSON / array / redirect, #8580 ×2wallet sendtest_wallet_send_human,…_signature_verifiestest_wallet_send_json--seed/ AMOUNT,abcamount/fee, negative (xfail), zero (xfail), invalid chain_id, node 400, unreachable / 4xx / 5xx, #8564 ×3, #8618 ×4nodetest_node_human_healthy,…_degradedtest_node_jsonepochtest_epoch_humantest_epoch_jsonminers listtest_miners_list_human[*],…_emptytest_miners_list_jsonattesttest_attest_human_full_flow,…_no_challengetest_attest_json_outputs_valid_json--seed, invalid seed (xfail), unreachable / 4xx / 5xx, #8566Test output ======================== 95 passed, 15 xfailed in 0.54s ========================