Repository navigation
Conversation
…nty #17181) Signed-off-by: czfygc <209356221+czfygc@users.noreply.github.com>
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.
Add a full pytest suite for the Python SDK Click CLI (
sdk/python/rustchain_sdk/cli.py) — the CLI is the command users copy from the README and until now had zero tests.Closes none (public bounty rustchain-bounties#17181, RTC for the fix — see that issue for payout rules).
Command → test mapping (
sdk/python/tests/test_cli.py, 80 tests / 75 passed / 5 xfailed locally)rustchain --help/--version/ group--helpTestGlobalHelpAndVersionwallet create(12/24 words,--json, help)TestWalletCreatewallet balance <addr>(--json,--node, missing arg, connection/HTTP/non-JSON, help)TestWalletBalancewallet send <from> <to> <amt>(--fee,--seed,--json,--node, amount serialization, address mismatch, missing seed, abc/negative/zero amounts, help)TestWalletSend,TestWalletSendAmountSerializationnode(healthy/unhealthy,--json,--node, conn/HTTP, help)TestNodeStatusepoch(--json,--node, conn, help)TestEpochInfominers list(empty/non-empty,--json,--node, conn, help,miners --help)TestMinersListattest <addr>(--json, challenge/no-challenge, mismatch, missing seed, conn/HTTP,--node, help)TestAttestTestNoTracebackLeakageTestInputValidationRegression tests (per #17181)
type=int)xfail(strict=True)— in-flight fix by othersTestRegression8564rustchain node statusvs CLIrustchain node)TestRegression8565attest --jsonreturns status without executing)xfail(strict=True)— asserts expected behavior (challenge+submit called), flips on fixTestRegression8566,TestAttest::test_attest_json_outputs_status_and_returnsxfail(strict=True)— regression test sits at the canonical-parsing layer; documented why the class-level mock cannot reach itTestRegression8580xfail(strict=True)— expects the fixed representationTestRegression8618Notes
unittest.mock, AsyncMock onRustChainClient).--jsonoutputs arejson.loads'd and key-checked; human outputs assert key figures.exit_code in (0,1,2)), error paths assert stderr messages and no tracebacks.git status: onlysdk/python/tests/test_cli.py,sdk/python/requirements-dev.txt,.github/workflows/sdk-python.ymladded..github/workflows/sdk-python.yml) running the suite on pushes/PRs touchingsdk/python/**.pytest 9.2.0): 75 passed, 5 xfailed, matching this description.DCO: committed with
git commit -s. No source files were modified.