algorand-python-testing 0.4.1__tar.gz → 0.5.0b1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/.github/workflows/cd.yaml +2 -2
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/.gitignore +1 -0
- algorand_python_testing-0.5.0b1/CHANGELOG.md +96 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/PKG-INFO +3 -3
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/README.md +1 -1
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/docs/testing-guide/opcodes.md +10 -8
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/pyproject.toml +3 -3
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/scripts/check_stubs_cov.py +85 -29
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/scripts/refresh_test_artifacts.py +2 -2
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/src/_algopy_testing/arc4.py +30 -32
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/src/_algopy_testing/compiled.py +2 -5
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/src/_algopy_testing/context_helpers/ledger_context.py +38 -6
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/src/_algopy_testing/decorators/arc4.py +27 -10
- algorand_python_testing-0.5.0b1/src/_algopy_testing/decorators/subroutine.py +25 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/src/_algopy_testing/models/account.py +6 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/src/_algopy_testing/models/contract.py +5 -2
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/src/_algopy_testing/models/txn_fields.py +2 -1
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/src/_algopy_testing/op/__init__.py +12 -0
- algorand_python_testing-0.5.0b1/src/_algopy_testing/op/block.py +51 -0
- algorand_python_testing-0.5.0b1/src/_algopy_testing/op/constants.py +30 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/src/_algopy_testing/op/crypto.py +30 -6
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/src/_algopy_testing/op/global_values.py +5 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/src/_algopy_testing/op/misc.py +200 -34
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/src/_algopy_testing/primitives/__init__.py +2 -1
- algorand_python_testing-0.5.0b1/src/_algopy_testing/primitives/array.py +144 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/src/_algopy_testing/primitives/bytes.py +4 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/src/_algopy_testing/protocols.py +12 -0
- algorand_python_testing-0.5.0b1/src/_algopy_testing/serialize.py +158 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/src/_algopy_testing/state/utils.py +7 -1
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/src/_algopy_testing/utils.py +5 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/src/algopy/__init__.py +7 -5
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/arc4/conftest.py +3 -3
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/arc4/test_arc4_method_signature.py +25 -27
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/arc4/test_struct.py +10 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/artifacts/Arc4ABIMethod/data/SignaturesContract.approval.teal +158 -166
- algorand_python_testing-0.5.0b1/tests/artifacts/Arc4ABIMethod/data/SignaturesContract.arc32.json +253 -0
- algorand_python_testing-0.5.0b1/tests/artifacts/Arc4ABIMethod/data/SignaturesContract.clear.teal +7 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/artifacts/Arc4InnerTxns/data/Arc4InnerTxnsContract.approval.teal +23 -16
- algorand_python_testing-0.5.0b1/tests/artifacts/Arc4InnerTxns/data/Arc4InnerTxnsContract.arc32.json +55 -0
- algorand_python_testing-0.5.0b1/tests/artifacts/Arc4InnerTxns/data/Arc4InnerTxnsContract.clear.teal +7 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/artifacts/Arc4PrimitiveOps/data/Arc4PrimitiveOpsContract.approval.teal +692 -860
- algorand_python_testing-0.5.0b1/tests/artifacts/Arc4PrimitiveOps/data/Arc4PrimitiveOpsContract.arc32.json +1029 -0
- algorand_python_testing-0.5.0b1/tests/artifacts/Arc4PrimitiveOps/data/Arc4PrimitiveOpsContract.clear.teal +7 -0
- algorand_python_testing-0.5.0b1/tests/artifacts/Arrays/data/Contract.approval.teal +1675 -0
- algorand_python_testing-0.5.0b1/tests/artifacts/Arrays/data/Contract.arc32.json +172 -0
- algorand_python_testing-0.5.0b1/tests/artifacts/Arrays/data/Contract.clear.teal +7 -0
- algorand_python_testing-0.5.0b1/tests/artifacts/Arrays/data/ImmutableArrayContract.approval.teal +3421 -0
- algorand_python_testing-0.5.0b1/tests/artifacts/Arrays/data/ImmutableArrayContract.arc32.json +450 -0
- algorand_python_testing-0.5.0b1/tests/artifacts/Arrays/data/ImmutableArrayContract.clear.teal +7 -0
- algorand_python_testing-0.5.0b1/tests/artifacts/Arrays/data/StaticSizeContract.approval.teal +902 -0
- algorand_python_testing-0.5.0b1/tests/artifacts/Arrays/data/StaticSizeContract.arc32.json +162 -0
- algorand_python_testing-0.5.0b1/tests/artifacts/Arrays/data/StaticSizeContract.clear.teal +7 -0
- algorand_python_testing-0.5.0b1/tests/artifacts/Arrays/immutable.py +428 -0
- algorand_python_testing-0.5.0b1/tests/artifacts/Arrays/static_size.py +135 -0
- algorand_python_testing-0.5.0b1/tests/artifacts/Arrays/uint64.py +255 -0
- algorand_python_testing-0.5.0b1/tests/artifacts/BoxContract/data/BoxContract.approval.teal +128 -0
- algorand_python_testing-0.5.0b1/tests/artifacts/BoxContract/data/BoxContract.arc32.json +63 -0
- algorand_python_testing-0.5.0b1/tests/artifacts/BoxContract/data/BoxContract.clear.teal +7 -0
- algorand_python_testing-0.5.0b1/tests/artifacts/Contains/data/MyContract.approval.teal +192 -0
- algorand_python_testing-0.5.0b1/tests/artifacts/Contains/data/MyContract.clear.teal +9 -0
- algorand_python_testing-0.5.0b1/tests/artifacts/CreatedAppAsset/data/AppCall.approval.teal +58 -0
- algorand_python_testing-0.5.0b1/tests/artifacts/CreatedAppAsset/data/AppCall.arc32.json +50 -0
- algorand_python_testing-0.5.0b1/tests/artifacts/CreatedAppAsset/data/AppCall.clear.teal +7 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/artifacts/CreatedAppAsset/data/AppExpectingEffects.approval.teal +56 -49
- algorand_python_testing-0.5.0b1/tests/artifacts/CreatedAppAsset/data/AppExpectingEffects.arc32.json +77 -0
- algorand_python_testing-0.5.0b1/tests/artifacts/CreatedAppAsset/data/AppExpectingEffects.clear.teal +7 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/artifacts/CryptoOps/data/CryptoOpsContract.approval.teal +304 -329
- algorand_python_testing-0.5.0b1/tests/artifacts/CryptoOps/data/CryptoOpsContract.arc32.json +368 -0
- algorand_python_testing-0.5.0b1/tests/artifacts/CryptoOps/data/CryptoOpsContract.clear.teal +7 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/artifacts/GlobalStateValidator/data/GlobalStateValidator.approval.teal +26 -18
- algorand_python_testing-0.5.0b1/tests/artifacts/GlobalStateValidator/data/GlobalStateValidator.arc32.json +59 -0
- algorand_python_testing-0.5.0b1/tests/artifacts/GlobalStateValidator/data/GlobalStateValidator.clear.teal +7 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/artifacts/MiscellaneousOps/data/MiscellaneousOpsContract.approval.teal +421 -464
- algorand_python_testing-0.5.0b1/tests/artifacts/MiscellaneousOps/data/MiscellaneousOpsContract.arc32.json +858 -0
- algorand_python_testing-0.5.0b1/tests/artifacts/MiscellaneousOps/data/MiscellaneousOpsContract.clear.teal +7 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/artifacts/PrimitiveOps/data/PrimitiveOpsContract.approval.teal +750 -801
- algorand_python_testing-0.5.0b1/tests/artifacts/PrimitiveOps/data/PrimitiveOpsContract.arc32.json +1393 -0
- algorand_python_testing-0.5.0b1/tests/artifacts/PrimitiveOps/data/PrimitiveOpsContract.clear.teal +7 -0
- algorand_python_testing-0.5.0b1/tests/artifacts/StateMutations/data/StateMutations.approval.teal +766 -0
- algorand_python_testing-0.5.0b1/tests/artifacts/StateMutations/data/StateMutations.arc32.json +95 -0
- algorand_python_testing-0.5.0b1/tests/artifacts/StateMutations/data/StateMutations.clear.teal +7 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/artifacts/StateOps/contract.py +25 -1
- algorand_python_testing-0.5.0b1/tests/artifacts/StateOps/data/GlobalStateContract.approval.teal +935 -0
- algorand_python_testing-0.5.0b1/tests/artifacts/StateOps/data/GlobalStateContract.arc32.json +528 -0
- algorand_python_testing-0.5.0b1/tests/artifacts/StateOps/data/GlobalStateContract.clear.teal +7 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/artifacts/StateOps/data/ITxnOpsContract.approval.teal +53 -49
- algorand_python_testing-0.5.0b1/tests/artifacts/StateOps/data/ITxnOpsContract.arc32.json +50 -0
- algorand_python_testing-0.5.0b1/tests/artifacts/StateOps/data/ITxnOpsContract.clear.teal +7 -0
- algorand_python_testing-0.5.0b1/tests/artifacts/StateOps/data/LocalStateContract.approval.teal +695 -0
- algorand_python_testing-0.5.0b1/tests/artifacts/StateOps/data/LocalStateContract.arc32.json +359 -0
- algorand_python_testing-0.5.0b1/tests/artifacts/StateOps/data/LocalStateContract.clear.teal +7 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/artifacts/StateOps/data/StateAcctParamsGetContract.approval.teal +377 -214
- algorand_python_testing-0.5.0b1/tests/artifacts/StateOps/data/StateAcctParamsGetContract.arc32.json +307 -0
- algorand_python_testing-0.5.0b1/tests/artifacts/StateOps/data/StateAcctParamsGetContract.clear.teal +7 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/artifacts/StateOps/data/StateAppGlobalContract.approval.teal +135 -134
- algorand_python_testing-0.5.0b1/tests/artifacts/StateOps/data/StateAppGlobalContract.arc32.json +188 -0
- algorand_python_testing-0.5.0b1/tests/artifacts/StateOps/data/StateAppGlobalContract.clear.teal +7 -0
- algorand_python_testing-0.5.0b1/tests/artifacts/StateOps/data/StateAppGlobalExContract.approval.teal +75 -0
- algorand_python_testing-0.5.0b1/tests/artifacts/StateOps/data/StateAppGlobalExContract.arc32.json +60 -0
- algorand_python_testing-0.5.0b1/tests/artifacts/StateOps/data/StateAppGlobalExContract.clear.teal +7 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/artifacts/StateOps/data/StateAppLocalContract.approval.teal +162 -175
- algorand_python_testing-0.5.0b1/tests/artifacts/StateOps/data/StateAppLocalContract.arc32.json +251 -0
- algorand_python_testing-0.5.0b1/tests/artifacts/StateOps/data/StateAppLocalContract.clear.teal +7 -0
- algorand_python_testing-0.5.0b1/tests/artifacts/StateOps/data/StateAppLocalExContract.approval.teal +67 -0
- algorand_python_testing-0.5.0b1/tests/artifacts/StateOps/data/StateAppLocalExContract.arc32.json +63 -0
- algorand_python_testing-0.5.0b1/tests/artifacts/StateOps/data/StateAppLocalExContract.clear.teal +7 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/artifacts/StateOps/data/StateAppParamsContract.approval.teal +220 -224
- algorand_python_testing-0.5.0b1/tests/artifacts/StateOps/data/StateAppParamsContract.arc32.json +199 -0
- algorand_python_testing-0.5.0b1/tests/artifacts/StateOps/data/StateAppParamsContract.clear.teal +7 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/artifacts/StateOps/data/StateAssetHoldingContract.approval.teal +49 -42
- algorand_python_testing-0.5.0b1/tests/artifacts/StateOps/data/StateAssetHoldingContract.arc32.json +81 -0
- algorand_python_testing-0.5.0b1/tests/artifacts/StateOps/data/StateAssetHoldingContract.clear.teal +7 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/artifacts/StateOps/data/StateAssetParamsContract.approval.teal +288 -292
- algorand_python_testing-0.5.0b1/tests/artifacts/StateOps/data/StateAssetParamsContract.arc32.json +253 -0
- algorand_python_testing-0.5.0b1/tests/artifacts/StateOps/data/StateAssetParamsContract.clear.teal +7 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/common.py +46 -53
- algorand_python_testing-0.5.0b1/tests/conftest.py +24 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/primitives/conftest.py +3 -3
- algorand_python_testing-0.5.0b1/tests/state/conftest.py +26 -0
- algorand_python_testing-0.5.0b1/tests/test_array.py +228 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/test_miscellaneous_op.py +3 -3
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/test_op.py +160 -102
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/utilities/conftest.py +3 -3
- algorand_python_testing-0.5.0b1/tests/value_generators/__init__.py +0 -0
- algorand_python_testing-0.4.1/CHANGELOG.md +0 -370
- algorand_python_testing-0.4.1/src/_algopy_testing/decorators/subroutine.py +0 -9
- algorand_python_testing-0.4.1/src/_algopy_testing/op/block.py +0 -28
- algorand_python_testing-0.4.1/src/_algopy_testing/op/constants.py +0 -7
- algorand_python_testing-0.4.1/tests/artifacts/Arc4ABIMethod/data/SignaturesContract.arc32.json +0 -253
- algorand_python_testing-0.4.1/tests/artifacts/Arc4ABIMethod/data/SignaturesContract.clear.teal +0 -7
- algorand_python_testing-0.4.1/tests/artifacts/Arc4InnerTxns/data/Arc4InnerTxnsContract.arc32.json +0 -55
- algorand_python_testing-0.4.1/tests/artifacts/Arc4InnerTxns/data/Arc4InnerTxnsContract.clear.teal +0 -7
- algorand_python_testing-0.4.1/tests/artifacts/Arc4PrimitiveOps/data/Arc4PrimitiveOpsContract.arc32.json +0 -1029
- algorand_python_testing-0.4.1/tests/artifacts/Arc4PrimitiveOps/data/Arc4PrimitiveOpsContract.clear.teal +0 -7
- algorand_python_testing-0.4.1/tests/artifacts/BoxContract/data/BoxContract.approval.teal +0 -151
- algorand_python_testing-0.4.1/tests/artifacts/BoxContract/data/BoxContract.arc32.json +0 -63
- algorand_python_testing-0.4.1/tests/artifacts/BoxContract/data/BoxContract.clear.teal +0 -7
- algorand_python_testing-0.4.1/tests/artifacts/Contains/data/MyContract.approval.teal +0 -1479
- algorand_python_testing-0.4.1/tests/artifacts/Contains/data/MyContract.clear.teal +0 -7
- algorand_python_testing-0.4.1/tests/artifacts/CreatedAppAsset/data/AppExpectingEffects.arc32.json +0 -77
- algorand_python_testing-0.4.1/tests/artifacts/CreatedAppAsset/data/AppExpectingEffects.clear.teal +0 -7
- algorand_python_testing-0.4.1/tests/artifacts/CryptoOps/data/CryptoOpsContract.arc32.json +0 -368
- algorand_python_testing-0.4.1/tests/artifacts/CryptoOps/data/CryptoOpsContract.clear.teal +0 -7
- algorand_python_testing-0.4.1/tests/artifacts/GlobalStateValidator/data/GlobalStateValidator.arc32.json +0 -59
- algorand_python_testing-0.4.1/tests/artifacts/GlobalStateValidator/data/GlobalStateValidator.clear.teal +0 -7
- algorand_python_testing-0.4.1/tests/artifacts/MiscellaneousOps/data/MiscellaneousOpsContract.arc32.json +0 -858
- algorand_python_testing-0.4.1/tests/artifacts/MiscellaneousOps/data/MiscellaneousOpsContract.clear.teal +0 -7
- algorand_python_testing-0.4.1/tests/artifacts/PrimitiveOps/data/PrimitiveOpsContract.arc32.json +0 -1393
- algorand_python_testing-0.4.1/tests/artifacts/PrimitiveOps/data/PrimitiveOpsContract.clear.teal +0 -7
- algorand_python_testing-0.4.1/tests/artifacts/StateOps/data/GlobalStateContract.approval.teal +0 -1109
- algorand_python_testing-0.4.1/tests/artifacts/StateOps/data/GlobalStateContract.arc32.json +0 -528
- algorand_python_testing-0.4.1/tests/artifacts/StateOps/data/GlobalStateContract.clear.teal +0 -7
- algorand_python_testing-0.4.1/tests/artifacts/StateOps/data/ITxnOpsContract.arc32.json +0 -50
- algorand_python_testing-0.4.1/tests/artifacts/StateOps/data/ITxnOpsContract.clear.teal +0 -7
- algorand_python_testing-0.4.1/tests/artifacts/StateOps/data/LocalStateContract.approval.teal +0 -817
- algorand_python_testing-0.4.1/tests/artifacts/StateOps/data/LocalStateContract.arc32.json +0 -359
- algorand_python_testing-0.4.1/tests/artifacts/StateOps/data/LocalStateContract.clear.teal +0 -7
- algorand_python_testing-0.4.1/tests/artifacts/StateOps/data/StateAcctParamsGetContract.arc32.json +0 -253
- algorand_python_testing-0.4.1/tests/artifacts/StateOps/data/StateAcctParamsGetContract.clear.teal +0 -7
- algorand_python_testing-0.4.1/tests/artifacts/StateOps/data/StateAppGlobalContract.arc32.json +0 -188
- algorand_python_testing-0.4.1/tests/artifacts/StateOps/data/StateAppGlobalContract.clear.teal +0 -7
- algorand_python_testing-0.4.1/tests/artifacts/StateOps/data/StateAppGlobalExContract.approval.teal +0 -77
- algorand_python_testing-0.4.1/tests/artifacts/StateOps/data/StateAppGlobalExContract.arc32.json +0 -60
- algorand_python_testing-0.4.1/tests/artifacts/StateOps/data/StateAppGlobalExContract.clear.teal +0 -7
- algorand_python_testing-0.4.1/tests/artifacts/StateOps/data/StateAppLocalContract.arc32.json +0 -251
- algorand_python_testing-0.4.1/tests/artifacts/StateOps/data/StateAppLocalContract.clear.teal +0 -7
- algorand_python_testing-0.4.1/tests/artifacts/StateOps/data/StateAppLocalExContract.approval.teal +0 -77
- algorand_python_testing-0.4.1/tests/artifacts/StateOps/data/StateAppLocalExContract.arc32.json +0 -63
- algorand_python_testing-0.4.1/tests/artifacts/StateOps/data/StateAppLocalExContract.clear.teal +0 -7
- algorand_python_testing-0.4.1/tests/artifacts/StateOps/data/StateAppParamsContract.arc32.json +0 -199
- algorand_python_testing-0.4.1/tests/artifacts/StateOps/data/StateAppParamsContract.clear.teal +0 -7
- algorand_python_testing-0.4.1/tests/artifacts/StateOps/data/StateAssetHoldingContract.arc32.json +0 -81
- algorand_python_testing-0.4.1/tests/artifacts/StateOps/data/StateAssetHoldingContract.clear.teal +0 -7
- algorand_python_testing-0.4.1/tests/artifacts/StateOps/data/StateAssetParamsContract.arc32.json +0 -253
- algorand_python_testing-0.4.1/tests/artifacts/StateOps/data/StateAssetParamsContract.clear.teal +0 -7
- algorand_python_testing-0.4.1/tests/conftest.py +0 -54
- algorand_python_testing-0.4.1/tests/state/conftest.py +0 -23
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/.coveragerc +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/.editorconfig +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/.github/dependabot.yml +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/.github/pull_request_template.md +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/.github/workflows/ci.yaml +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/.github/workflows/gh-pages.yaml +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/.pre-commit-config.yaml +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/.vscode/extensions.json +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/.vscode/launch.json +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/.vscode/settings.json +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/CONTRIBUTING.md +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/LICENSE +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/docs/Makefile +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/docs/__init__.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/docs/_static/custom.css +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/docs/algopy.md +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/docs/api.md +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/docs/conf.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/docs/coverage.md +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/docs/examples.md +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/docs/faq.md +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/docs/index.md +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/docs/make.bat +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/docs/testing-guide/arc4-types.md +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/docs/testing-guide/avm-types.md +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/docs/testing-guide/concepts.md +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/docs/testing-guide/contract-testing.md +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/docs/testing-guide/index.md +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/docs/testing-guide/signature-testing.md +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/docs/testing-guide/state-management.md +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/docs/testing-guide/subroutines.md +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/docs/testing-guide/transactions.md +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/examples/README.md +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/examples/__init__.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/examples/auction/__init__.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/examples/auction/contract.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/examples/auction/test_contract.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/examples/htlc_logicsig/__init__.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/examples/htlc_logicsig/signature.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/examples/htlc_logicsig/test_signature.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/examples/marketplace/__init__.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/examples/marketplace/contract.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/examples/marketplace/test_contract.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/examples/proof_of_attendance/__init__.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/examples/proof_of_attendance/contract.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/examples/proof_of_attendance/test_contract.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/examples/scratch_storage/__init__.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/examples/scratch_storage/contract.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/examples/scratch_storage/test_contract.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/examples/simple_voting/__init__.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/examples/simple_voting/contract.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/examples/simple_voting/test_contract.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/examples/zk_whitelist/__init__.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/examples/zk_whitelist/contract.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/examples/zk_whitelist/test_contract.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/scripts/__init__.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/scripts/validate_examples.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/src/_algopy_testing/__init__.py +6 -6
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/src/_algopy_testing/constants.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/src/_algopy_testing/context.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/src/_algopy_testing/context_helpers/__init__.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/src/_algopy_testing/context_helpers/context_storage.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/src/_algopy_testing/context_helpers/txn_context.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/src/_algopy_testing/decorators/__init__.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/src/_algopy_testing/enums.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/src/_algopy_testing/gtxn.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/src/_algopy_testing/itxn.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/src/_algopy_testing/itxn_loader.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/src/_algopy_testing/models/__init__.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/src/_algopy_testing/models/application.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/src/_algopy_testing/models/asset.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/src/_algopy_testing/models/logicsig.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/src/_algopy_testing/models/template_variable.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/src/_algopy_testing/models/unsigned_builtins.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/src/_algopy_testing/mutable.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/src/_algopy_testing/op/itxn.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/src/_algopy_testing/op/pure.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/src/_algopy_testing/op/txn.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/src/_algopy_testing/primitives/biguint.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/src/_algopy_testing/primitives/string.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/src/_algopy_testing/primitives/uint64.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/src/_algopy_testing/py.typed +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/src/_algopy_testing/state/__init__.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/src/_algopy_testing/state/box.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/src/_algopy_testing/state/global_state.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/src/_algopy_testing/state/local_state.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/src/_algopy_testing/utilities/__init__.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/src/_algopy_testing/utilities/budget.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/src/_algopy_testing/utilities/log.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/src/_algopy_testing/value_generators/__init__.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/src/_algopy_testing/value_generators/arc4.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/src/_algopy_testing/value_generators/avm.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/src/_algopy_testing/value_generators/txn.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/src/algopy/arc4.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/src/algopy/gtxn.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/src/algopy/itxn.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/src/algopy/op.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/src/algopy/py.typed +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/src/algopy_testing/__init__.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/src/algopy_testing/py.typed +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/templates/.macros.j2 +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/templates/.release_notes.md.j2 +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/templates/CHANGELOG.md.j2 +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/__init__.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/arc4/__init__.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/arc4/test_abi_call.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/arc4/test_address.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/arc4/test_bool.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/arc4/test_dynamic_array.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/arc4/test_dynamic_bytes.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/arc4/test_emit.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/arc4/test_static_array.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/arc4/test_string.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/arc4/test_tuple.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/arc4/test_ufixednxm.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/arc4/test_uintn.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/artifacts/Arc4ABIMethod/__init__.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/artifacts/Arc4ABIMethod/contract.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/artifacts/Arc4InnerTxns/__init__.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/artifacts/Arc4InnerTxns/contract.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/artifacts/Arc4PrimitiveOps/__init__.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/artifacts/Arc4PrimitiveOps/contract.py +0 -0
- {algorand_python_testing-0.4.1/tests/artifacts/BoxContract → algorand_python_testing-0.5.0b1/tests/artifacts/Arrays}/__init__.py +0 -0
- {algorand_python_testing-0.4.1/tests/artifacts/Contains → algorand_python_testing-0.5.0b1/tests/artifacts/BoxContract}/__init__.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/artifacts/BoxContract/contract.py +0 -0
- {algorand_python_testing-0.4.1/tests/artifacts/CreatedAppAsset → algorand_python_testing-0.5.0b1/tests/artifacts/Contains}/__init__.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/artifacts/Contains/contract.py +0 -0
- {algorand_python_testing-0.4.1/tests/artifacts/CryptoOps → algorand_python_testing-0.5.0b1/tests/artifacts/CreatedAppAsset}/__init__.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/artifacts/CreatedAppAsset/contract.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/artifacts/CreatedAppAsset/other.py +0 -0
- {algorand_python_testing-0.4.1/tests/artifacts/GlobalStateValidator → algorand_python_testing-0.5.0b1/tests/artifacts/CryptoOps}/__init__.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/artifacts/CryptoOps/contract.py +0 -0
- {algorand_python_testing-0.4.1/tests/artifacts/MiscellaneousOps → algorand_python_testing-0.5.0b1/tests/artifacts/GlobalStateValidator}/__init__.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/artifacts/GlobalStateValidator/contract.py +0 -0
- {algorand_python_testing-0.4.1/tests/artifacts/PrimitiveOps → algorand_python_testing-0.5.0b1/tests/artifacts/MiscellaneousOps}/__init__.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/artifacts/MiscellaneousOps/contract.py +0 -0
- {algorand_python_testing-0.4.1/tests/artifacts/StateMutations → algorand_python_testing-0.5.0b1/tests/artifacts/PrimitiveOps}/__init__.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/artifacts/PrimitiveOps/contract.py +0 -0
- {algorand_python_testing-0.4.1/tests/artifacts/StateOps → algorand_python_testing-0.5.0b1/tests/artifacts/StateMutations}/__init__.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/artifacts/StateMutations/data/Contract.approval.teal +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/artifacts/StateMutations/data/Contract.arc32.json +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/artifacts/StateMutations/data/Contract.clear.teal +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/artifacts/StateMutations/statemutations.py +0 -0
- {algorand_python_testing-0.4.1/tests/artifacts → algorand_python_testing-0.5.0b1/tests/artifacts/StateOps}/__init__.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/artifacts/StateOps/data/StateAcctParamsGet.approval.teal +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/artifacts/StateOps/data/StateAcctParamsGet.arc32.json +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/artifacts/StateOps/data/StateAcctParamsGet.clear.teal +0 -0
- {algorand_python_testing-0.4.1/tests/contexts → algorand_python_testing-0.5.0b1/tests/artifacts}/__init__.py +0 -0
- {algorand_python_testing-0.4.1/tests/models → algorand_python_testing-0.5.0b1/tests/contexts}/__init__.py +0 -0
- {algorand_python_testing-0.4.1/tests/primitives → algorand_python_testing-0.5.0b1/tests/models}/__init__.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/models/test_asset.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/models/test_box.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/models/test_box_map.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/models/test_box_ref.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/models/test_contract.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/models/test_uenumerate.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/models/test_urange.py +0 -0
- {algorand_python_testing-0.4.1/tests/state → algorand_python_testing-0.5.0b1/tests/primitives}/__init__.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/primitives/test_biguint.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/primitives/test_bytes.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/primitives/test_string.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/primitives/test_uint64.py +0 -0
- {algorand_python_testing-0.4.1/tests/utilities → algorand_python_testing-0.5.0b1/tests/state}/__init__.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/state/test_global_state.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/state/test_local_state.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/state/test_mutations.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/test_context.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/util.py +0 -0
- {algorand_python_testing-0.4.1/tests/value_generators → algorand_python_testing-0.5.0b1/tests/utilities}/__init__.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/utilities/test_log.py +0 -0
- {algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/tests/value_generators/test_avm.py +0 -0
|
@@ -45,7 +45,7 @@ jobs:
|
|
|
45
45
|
- uses: actions/checkout@v4
|
|
46
46
|
with:
|
|
47
47
|
fetch-depth: 0
|
|
48
|
-
token: ${{ secrets.
|
|
48
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
|
49
49
|
|
|
50
50
|
- name: Install hatch
|
|
51
51
|
run: pipx install hatch
|
|
@@ -79,7 +79,7 @@ jobs:
|
|
|
79
79
|
if: ${{ github.ref == 'refs/heads/main' }}
|
|
80
80
|
uses: python-semantic-release/python-semantic-release@master
|
|
81
81
|
with:
|
|
82
|
-
github_token: ${{ secrets.
|
|
82
|
+
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
83
83
|
prerelease: ${{ env.PRERELEASE == 'true' }}
|
|
84
84
|
root_options: $DRY_RUN
|
|
85
85
|
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# CHANGELOG
|
|
2
|
+
## v0.5.0-beta.1 (2025-02-19)
|
|
3
|
+
|
|
4
|
+
### Documentation
|
|
5
|
+
|
|
6
|
+
* fix doctest example for `algopy.EllipticCurve` ([`7d0bb0d`](https://github.com/algorandfoundation/algorand-python-testing/commit/7d0bb0dfe9a5ea2d67b130fa300fb80cef52fda5))
|
|
7
|
+
|
|
8
|
+
## v0.4.1 (2024-09-03)
|
|
9
|
+
|
|
10
|
+
## v0.4.1-beta.1 (2024-09-03)
|
|
11
|
+
|
|
12
|
+
## v0.4.0 (2024-08-27)
|
|
13
|
+
|
|
14
|
+
## v0.4.0-beta.2 (2024-08-27)
|
|
15
|
+
|
|
16
|
+
## v0.4.0-beta.1 (2024-08-27)
|
|
17
|
+
|
|
18
|
+
### Documentation
|
|
19
|
+
|
|
20
|
+
* include usage of `algopy_testing_context` in README.md quick start ([`4702f60`](https://github.com/algorandfoundation/algorand-python-testing/commit/4702f60cfe7d09956a5ae6dbdcd72da29fdda808))
|
|
21
|
+
|
|
22
|
+
## v0.3.0 (2024-08-22)
|
|
23
|
+
|
|
24
|
+
## v0.3.0-beta.10 (2024-08-22)
|
|
25
|
+
|
|
26
|
+
## v0.3.0-beta.9 (2024-08-22)
|
|
27
|
+
|
|
28
|
+
## v0.3.0-beta.8 (2024-08-22)
|
|
29
|
+
|
|
30
|
+
## v0.3.0-beta.7 (2024-08-21)
|
|
31
|
+
|
|
32
|
+
## v0.3.0-beta.6 (2024-08-21)
|
|
33
|
+
|
|
34
|
+
### Documentation
|
|
35
|
+
|
|
36
|
+
* documentation for initial stable release of `algorand-python-testing` (#8) ([`9d97d0d`](https://github.com/algorandfoundation/algorand-python-testing/commit/9d97d0de5ff9897e642ec3f11a186f2fb95375bb))
|
|
37
|
+
|
|
38
|
+
* docs: wip
|
|
39
|
+
|
|
40
|
+
* chore: refresh pyproject
|
|
41
|
+
|
|
42
|
+
* docs: refining docs (wip)
|
|
43
|
+
|
|
44
|
+
* chore: integrating doctests
|
|
45
|
+
|
|
46
|
+
* docs: revamping docs with latest features
|
|
47
|
+
|
|
48
|
+
* docs: minor consistency with main readme; patching doctests
|
|
49
|
+
|
|
50
|
+
* docs: removing the box from examples
|
|
51
|
+
|
|
52
|
+
* docs: refine op codes section
|
|
53
|
+
|
|
54
|
+
* chore: merge conflicts
|
|
55
|
+
|
|
56
|
+
* chore: apply suggestions from code review
|
|
57
|
+
|
|
58
|
+
Co-authored-by: Daniel McGregor <daniel.mcgregor@makerx.com.au>
|
|
59
|
+
|
|
60
|
+
* docs: addressing docs pr comments
|
|
61
|
+
|
|
62
|
+
## v0.3.0-beta.5 (2024-08-21)
|
|
63
|
+
|
|
64
|
+
## v0.3.0-beta.4 (2024-08-21)
|
|
65
|
+
|
|
66
|
+
### Documentation
|
|
67
|
+
|
|
68
|
+
* integrating pydoclint; formatting docs; removing docs from stub implementation ([`d729bf9`](https://github.com/algorandfoundation/algorand-python-testing/commit/d729bf9b70ef885cd1b2ef705c4f5e2582d853ab))
|
|
69
|
+
|
|
70
|
+
## v0.3.0-beta.3 (2024-08-16)
|
|
71
|
+
|
|
72
|
+
## v0.3.0-beta.2 (2024-08-16)
|
|
73
|
+
|
|
74
|
+
## v0.3.0-beta.1 (2024-08-14)
|
|
75
|
+
|
|
76
|
+
## v0.2.2-beta.5 (2024-07-30)
|
|
77
|
+
|
|
78
|
+
### Documentation
|
|
79
|
+
|
|
80
|
+
* patch urls in README.md (#9) ([`eddf612`](https://github.com/algorandfoundation/algorand-python-testing/commit/eddf612b177a2acddf15d58be3f375e99fb6564b))
|
|
81
|
+
|
|
82
|
+
* chore: patch urls in README.md
|
|
83
|
+
|
|
84
|
+
* ci: relaxing rules around paths-ignore
|
|
85
|
+
|
|
86
|
+
* docs: patching old namespace name in readme
|
|
87
|
+
|
|
88
|
+
## v0.2.2-beta.4 (2024-07-25)
|
|
89
|
+
|
|
90
|
+
## v0.2.2-beta.3 (2024-07-25)
|
|
91
|
+
|
|
92
|
+
## v0.2.2-beta.2 (2024-07-25)
|
|
93
|
+
|
|
94
|
+
## v0.2.2-beta.1 (2024-07-24)
|
|
95
|
+
|
|
96
|
+
## v0.2.1 (2024-07-10)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: algorand-python-testing
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.5.0b1
|
|
4
4
|
Summary: Algorand Python testing library
|
|
5
5
|
Project-URL: Documentation, https://github.com/algorandfoundation/puya/tree/main/algopy_testing#README.md
|
|
6
6
|
Project-URL: Issues, https://github.com/algorandfoundation/puya/issues
|
|
@@ -48,7 +48,7 @@ Alternatively, if you want to start from scratch:
|
|
|
48
48
|
2. Install [AlgoKit CLI](https://github.com/algorandfoundation/algokit-cli?tab=readme-ov-file#install)
|
|
49
49
|
3. Install Algorand Python Testing into your project:
|
|
50
50
|
```bash
|
|
51
|
-
pip install algorand-testing
|
|
51
|
+
pip install algorand-python-testing
|
|
52
52
|
```
|
|
53
53
|
4. Create a test file (e.g., `test_contract.py`):
|
|
54
54
|
|
|
@@ -25,7 +25,7 @@ Alternatively, if you want to start from scratch:
|
|
|
25
25
|
2. Install [AlgoKit CLI](https://github.com/algorandfoundation/algokit-cli?tab=readme-ov-file#install)
|
|
26
26
|
3. Install Algorand Python Testing into your project:
|
|
27
27
|
```bash
|
|
28
|
-
pip install algorand-testing
|
|
28
|
+
pip install algorand-python-testing
|
|
29
29
|
```
|
|
30
30
|
4. Create a test file (e.g., `test_contract.py`):
|
|
31
31
|
|
{algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/docs/testing-guide/opcodes.md
RENAMED
|
@@ -353,20 +353,22 @@ test_mock_vrf_verify()
|
|
|
353
353
|
from unittest.mock import patch, MagicMock
|
|
354
354
|
import algopy
|
|
355
355
|
|
|
356
|
-
def
|
|
357
|
-
mock_result =
|
|
358
|
-
with patch('algopy.op.EllipticCurve.
|
|
359
|
-
result = algopy.op.EllipticCurve.
|
|
356
|
+
def test_mock_elliptic_curve_add():
|
|
357
|
+
mock_result = algopy.Bytes(b'result')
|
|
358
|
+
with patch('algopy.op.EllipticCurve.add', return_value=mock_result) as mock_add:
|
|
359
|
+
result = algopy.op.EllipticCurve.add(
|
|
360
360
|
algopy.op.EC.BN254g1,
|
|
361
|
-
algopy.Bytes(b'
|
|
361
|
+
algopy.Bytes(b'a'),
|
|
362
|
+
algopy.Bytes(b'b')
|
|
362
363
|
)
|
|
363
364
|
assert result == mock_result
|
|
364
|
-
|
|
365
|
+
mock_add.assert_called_once_with(
|
|
365
366
|
algopy.op.EC.BN254g1,
|
|
366
|
-
algopy.Bytes(b'
|
|
367
|
+
algopy.Bytes(b'a'),
|
|
368
|
+
algopy.Bytes(b'b'),
|
|
367
369
|
)
|
|
368
370
|
|
|
369
|
-
|
|
371
|
+
test_mock_elliptic_curve_add()
|
|
370
372
|
```
|
|
371
373
|
|
|
372
374
|
These examples demonstrate how to mock key mockable opcodes in `algorand-python-testing`. Use similar techniques (in your preferred testing framework) for other mockable opcodes like `algopy.compile_logicsig`, `algopy.arc4.arc4_create`, and `algopy.arc4.arc4_update`.
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "algorand-python-testing"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.5.0-beta.1"
|
|
8
8
|
description = 'Algorand Python testing library'
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.12"
|
|
@@ -57,7 +57,7 @@ dependencies = [
|
|
|
57
57
|
"pytest-mock>=3.10.0",
|
|
58
58
|
"pytest-xdist[psutil]>=3.3",
|
|
59
59
|
"py-algorand-sdk>=2.4.0",
|
|
60
|
-
"algokit-utils>=
|
|
60
|
+
"algokit-utils>=3.0.0",
|
|
61
61
|
"pytest-cov>=4.1.0",
|
|
62
62
|
"prettytable>=3.9.0",
|
|
63
63
|
"mypy==1.10",
|
|
@@ -171,7 +171,7 @@ dependencies = [
|
|
|
171
171
|
"pytest-mock>=3.10.0",
|
|
172
172
|
"pytest-xdist[psutil]>=3.3",
|
|
173
173
|
"py-algorand-sdk>=2.4.0",
|
|
174
|
-
"algokit-utils>=
|
|
174
|
+
"algokit-utils>=3.0.0",
|
|
175
175
|
"pytest-cov>=4.1.0",
|
|
176
176
|
"mypy==1.10",
|
|
177
177
|
]
|
{algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/scripts/check_stubs_cov.py
RENAMED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import ast
|
|
2
|
+
import importlib
|
|
2
3
|
import inspect
|
|
3
4
|
import site
|
|
4
5
|
import sys
|
|
6
|
+
import typing
|
|
5
7
|
from collections.abc import Iterable
|
|
6
8
|
from pathlib import Path
|
|
7
9
|
from typing import NamedTuple
|
|
@@ -13,6 +15,40 @@ SITE_PACKAGES = Path(site.getsitepackages()[0])
|
|
|
13
15
|
STUBS_ROOT = SITE_PACKAGES / "algopy-stubs"
|
|
14
16
|
IMPL = PROJECT_ROOT / "src"
|
|
15
17
|
ROOT_MODULE = "algopy"
|
|
18
|
+
_ADDITIONAL_GLOBAL_IMPLS = [
|
|
19
|
+
"_algopy_testing.op.global_values._Global",
|
|
20
|
+
"_algopy_testing.op.global_values.GlobalFields",
|
|
21
|
+
]
|
|
22
|
+
_ADDITIONAL_TXN_IMPLS = [
|
|
23
|
+
"_algopy_testing.models.txn_fields.TransactionFields",
|
|
24
|
+
"_algopy_testing.models.txn_fields.TransactionFieldsGetter",
|
|
25
|
+
"_algopy_testing.op.constants.OP_MEMBER_TO_TXN_MEMBER",
|
|
26
|
+
]
|
|
27
|
+
|
|
28
|
+
# mapping of stub types to additional implementation types to scan for members
|
|
29
|
+
_ADDITIONAL_TYPE_IMPLS = {
|
|
30
|
+
"algopy.Asset": ["_algopy_testing.models.asset.AssetFields"],
|
|
31
|
+
"algopy.Account": ["_algopy_testing.models.account.AccountFields"],
|
|
32
|
+
"algopy.Application": ["_algopy_testing.models.application.ApplicationFields"],
|
|
33
|
+
"algopy.Global": _ADDITIONAL_GLOBAL_IMPLS,
|
|
34
|
+
"algopy.Txn": _ADDITIONAL_TXN_IMPLS,
|
|
35
|
+
"algopy.op.Global": _ADDITIONAL_GLOBAL_IMPLS,
|
|
36
|
+
"algopy.op.GTxn": _ADDITIONAL_TXN_IMPLS,
|
|
37
|
+
"algopy.op.GITxn": _ADDITIONAL_TXN_IMPLS,
|
|
38
|
+
"algopy.op.Txn": _ADDITIONAL_TXN_IMPLS,
|
|
39
|
+
"algopy.op.ITxn": _ADDITIONAL_TXN_IMPLS,
|
|
40
|
+
"algopy.op.ITxnCreate": _ADDITIONAL_TXN_IMPLS,
|
|
41
|
+
"algopy.op.AppParamsGet": ["_algopy_testing.op.misc._AppParamsGet"],
|
|
42
|
+
"algopy.op.AssetHoldingGet": ["_algopy_testing.op.misc._AssetHoldingGet"],
|
|
43
|
+
"algopy.op.AppGlobal": ["_algopy_testing.op.misc._AppGlobal"],
|
|
44
|
+
"algopy.op.AppLocal": ["_algopy_testing.op.misc._AppLocal"],
|
|
45
|
+
"algopy.op.Scratch": ["_algopy_testing.op.misc._Scratch"],
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
# mapping of stub types to members that may be present but not found when discovering members
|
|
49
|
+
_ADDITIONAL_MEMBERS = {
|
|
50
|
+
"algopy.Asset": ["id"],
|
|
51
|
+
}
|
|
16
52
|
|
|
17
53
|
|
|
18
54
|
class ASTNodeDefinition(NamedTuple):
|
|
@@ -127,9 +163,6 @@ def collect_stubs(stubs_dir: Path, relative_module: str) -> dict[str, ASTNodeDef
|
|
|
127
163
|
def collect_coverage(stubs: dict[str, ASTNodeDefinition]) -> list[CoverageResult]:
|
|
128
164
|
result = []
|
|
129
165
|
for full_name, stub in stubs.items():
|
|
130
|
-
if "GTxn" in full_name:
|
|
131
|
-
print("stop")
|
|
132
|
-
|
|
133
166
|
coverage = _get_impl_coverage(full_name, stub)
|
|
134
167
|
if coverage:
|
|
135
168
|
try:
|
|
@@ -145,7 +178,7 @@ def collect_coverage(stubs: dict[str, ASTNodeDefinition]) -> list[CoverageResult
|
|
|
145
178
|
CoverageResult(
|
|
146
179
|
full_name=full_name,
|
|
147
180
|
stub_file=str(stub.path.relative_to(STUBS_ROOT)),
|
|
148
|
-
impl_file=impl_file,
|
|
181
|
+
impl_file=impl_file or "MISSING!",
|
|
149
182
|
coverage=coverage.coverage if coverage else 0,
|
|
150
183
|
missing=", ".join(coverage.missing if coverage else []),
|
|
151
184
|
)
|
|
@@ -156,18 +189,16 @@ def collect_coverage(stubs: dict[str, ASTNodeDefinition]) -> list[CoverageResult
|
|
|
156
189
|
def print_results(results: list[CoverageResult]) -> None:
|
|
157
190
|
table = PrettyTable(
|
|
158
191
|
field_names=["Name", "Implementation", "Source Stub", "Coverage", "Missing"],
|
|
159
|
-
sortby="Coverage",
|
|
160
192
|
header=True,
|
|
161
193
|
border=True,
|
|
162
194
|
padding_width=2,
|
|
163
|
-
reversesort=True,
|
|
164
195
|
left_padding_width=0,
|
|
165
196
|
right_padding_width=1,
|
|
166
197
|
align="l",
|
|
167
198
|
max_width=100,
|
|
168
199
|
)
|
|
169
200
|
|
|
170
|
-
for result in results:
|
|
201
|
+
for result in sorted(results, key=lambda c: c.coverage):
|
|
171
202
|
table.add_row(
|
|
172
203
|
[
|
|
173
204
|
result.full_name,
|
|
@@ -209,7 +240,6 @@ def _get_impl_coverage(symbol: str, stub: ASTNodeDefinition) -> ImplCoverage | N
|
|
|
209
240
|
try:
|
|
210
241
|
impl = getattr(mod, name)
|
|
211
242
|
except AttributeError:
|
|
212
|
-
print(f"Attribute {name} not found in module {module}")
|
|
213
243
|
return None
|
|
214
244
|
|
|
215
245
|
try:
|
|
@@ -219,20 +249,6 @@ def _get_impl_coverage(symbol: str, stub: ASTNodeDefinition) -> ImplCoverage | N
|
|
|
219
249
|
if hasattr(impl, "__class__"):
|
|
220
250
|
try:
|
|
221
251
|
impl_path = Path(inspect.getfile(impl.__class__))
|
|
222
|
-
# For special cases like GTxn and GITxn, assume full implementation
|
|
223
|
-
if name in [
|
|
224
|
-
"GTxn",
|
|
225
|
-
"GITxn",
|
|
226
|
-
"Txn",
|
|
227
|
-
"ITxn",
|
|
228
|
-
"Global",
|
|
229
|
-
"AssetConfigInnerTransaction",
|
|
230
|
-
"Contract",
|
|
231
|
-
"ApplicationCallInnerTransaction",
|
|
232
|
-
"UFixedNxM",
|
|
233
|
-
"BigUFixedNxM",
|
|
234
|
-
]:
|
|
235
|
-
return ImplCoverage(impl_path)
|
|
236
252
|
except TypeError:
|
|
237
253
|
print(f"Warning: Could not determine file for {symbol}")
|
|
238
254
|
return None
|
|
@@ -240,18 +256,56 @@ def _get_impl_coverage(symbol: str, stub: ASTNodeDefinition) -> ImplCoverage | N
|
|
|
240
256
|
print(f"Warning: Could not determine file for {symbol}")
|
|
241
257
|
return None
|
|
242
258
|
|
|
243
|
-
return _compare_stub_impl(stub.node, impl, impl_path)
|
|
259
|
+
return _compare_stub_impl(stub.node, symbol, impl, impl_path)
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
def _get_impl_members(impl_name: str, impl: object) -> set[str]:
|
|
263
|
+
if isinstance(impl, type):
|
|
264
|
+
impl_mros: list[object] = [
|
|
265
|
+
typ for typ in impl.mro() if typ.__module__.startswith("_algopy_testing")
|
|
266
|
+
]
|
|
267
|
+
else:
|
|
268
|
+
impl_mros = []
|
|
269
|
+
for additional_type in _ADDITIONAL_TYPE_IMPLS.get(impl_name, []):
|
|
270
|
+
impl_mros.append(_resolve_fullname(additional_type))
|
|
271
|
+
|
|
272
|
+
impl_members = set[str](_ADDITIONAL_MEMBERS.get(impl_name, []))
|
|
273
|
+
for impl_typ in impl_mros:
|
|
274
|
+
if typing.is_typeddict(impl_typ) and isinstance(impl_typ, type):
|
|
275
|
+
for typed_dict_mro in impl_typ.mro():
|
|
276
|
+
ann = getattr(typed_dict_mro, "__annotations__", None)
|
|
277
|
+
if isinstance(ann, dict):
|
|
278
|
+
impl_members.update(ann.keys())
|
|
279
|
+
elif isinstance(impl_typ, dict):
|
|
280
|
+
impl_members.update(impl_typ.keys())
|
|
281
|
+
elif isinstance(impl_typ, type):
|
|
282
|
+
members = list(vars(impl_typ).keys())
|
|
283
|
+
impl_members.update(members)
|
|
284
|
+
else:
|
|
285
|
+
raise ValueError(f"unexpected implementation type, {impl_typ}")
|
|
286
|
+
# special case for ITxnCreate
|
|
287
|
+
if impl_name == "algopy.op.ITxnCreate":
|
|
288
|
+
impl_members = {f"set_{member}" for member in impl_members}
|
|
289
|
+
impl_members.update(("begin", "next", "submit"))
|
|
290
|
+
return impl_members
|
|
291
|
+
|
|
244
292
|
|
|
293
|
+
def _resolve_fullname(fullname: str) -> object:
|
|
294
|
+
# note this assumes no nested classes
|
|
295
|
+
module_name, type_name = fullname.rsplit(".", maxsplit=1)
|
|
296
|
+
module = importlib.import_module(module_name)
|
|
297
|
+
return getattr(module, type_name)
|
|
245
298
|
|
|
246
|
-
|
|
299
|
+
|
|
300
|
+
def _compare_stub_impl(
|
|
301
|
+
stub: ast.AST, impl_name: str, impl: object, impl_path: Path
|
|
302
|
+
) -> ImplCoverage:
|
|
247
303
|
# classes are really the only types that can be "partially implemented"
|
|
248
304
|
# from a typing perspective
|
|
249
|
-
|
|
305
|
+
# algopy.uenumerate is typed as a class, but is really just a function
|
|
306
|
+
if not isinstance(stub, ast.ClassDef) or impl_name == "algopy.uenumerate":
|
|
250
307
|
return ImplCoverage(impl_path)
|
|
251
|
-
|
|
252
|
-
# using vars to only get explicitly implemented members
|
|
253
|
-
# need more sophisticated approach if implementations start using inheritance
|
|
254
|
-
impl_members = set(vars(impl))
|
|
308
|
+
impl_members = _get_impl_members(impl_name, impl)
|
|
255
309
|
stub_members = set()
|
|
256
310
|
for stmt in stub.body:
|
|
257
311
|
if isinstance(stmt, ast.FunctionDef):
|
|
@@ -287,6 +341,8 @@ def _compare_stub_impl(stub: ast.AST, impl: object, impl_path: Path) -> ImplCove
|
|
|
287
341
|
"ne",
|
|
288
342
|
)
|
|
289
343
|
}
|
|
344
|
+
# excluding special fields used in typing hints
|
|
345
|
+
default_impls.update(("__match_args__", "__match_value__"))
|
|
290
346
|
missing = sorted(stub_members.difference({*impl_members, *default_impls}))
|
|
291
347
|
return ImplCoverage(impl_path, sorted(stub_members), missing)
|
|
292
348
|
|
{algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/scripts/refresh_test_artifacts.py
RENAMED
|
@@ -16,13 +16,13 @@ ENV_WITH_NO_COLOR = dict(os.environ) | {
|
|
|
16
16
|
|
|
17
17
|
def get_artifact_folders(root_dir: str) -> Iterator[Path]:
|
|
18
18
|
for folder in Path(root_dir).iterdir():
|
|
19
|
-
if folder.is_dir() and (folder
|
|
19
|
+
if folder.is_dir() and not str(folder.stem).startswith((".", "__")):
|
|
20
20
|
yield folder
|
|
21
21
|
|
|
22
22
|
|
|
23
23
|
def compile_contract(folder: Path) -> None:
|
|
24
24
|
logger.info(f"Compiling: {folder}")
|
|
25
|
-
contract_path = folder
|
|
25
|
+
contract_path = folder
|
|
26
26
|
(folder / "data").mkdir(exist_ok=True)
|
|
27
27
|
compile_cmd = [
|
|
28
28
|
"hatch",
|
{algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/src/_algopy_testing/arc4.py
RENAMED
|
@@ -17,6 +17,7 @@ from _algopy_testing.constants import (
|
|
|
17
17
|
UINT512_SIZE,
|
|
18
18
|
)
|
|
19
19
|
from _algopy_testing.models.account import Account
|
|
20
|
+
from _algopy_testing.models.contract import ARC4Contract
|
|
20
21
|
from _algopy_testing.mutable import (
|
|
21
22
|
MutableBytes,
|
|
22
23
|
add_mutable_callback,
|
|
@@ -42,6 +43,7 @@ if typing.TYPE_CHECKING:
|
|
|
42
43
|
|
|
43
44
|
__all__ = [
|
|
44
45
|
"ARC4Client",
|
|
46
|
+
"ARC4Contract",
|
|
45
47
|
"Address",
|
|
46
48
|
"BigUFixedNxM",
|
|
47
49
|
"BigUIntN",
|
|
@@ -743,7 +745,7 @@ class _DynamicArrayTypeInfo(_TypeInfo):
|
|
|
743
745
|
return True
|
|
744
746
|
|
|
745
747
|
|
|
746
|
-
class _DynamicArrayMeta(type(_ABIEncoded), typing.Generic[_TArrayItem
|
|
748
|
+
class _DynamicArrayMeta(type(_ABIEncoded), typing.Generic[_TArrayItem]): # type: ignore[misc]
|
|
747
749
|
__concrete__: typing.ClassVar[dict[type, type]] = {}
|
|
748
750
|
|
|
749
751
|
def __getitem__(cls, key_t: type[_TArrayItem]) -> type:
|
|
@@ -1013,17 +1015,18 @@ class Tuple(
|
|
|
1013
1015
|
|
|
1014
1016
|
|
|
1015
1017
|
class _StructTypeInfo(_TypeInfo):
|
|
1016
|
-
def __init__(self, struct_type: type[Struct]) -> None:
|
|
1018
|
+
def __init__(self, struct_type: type[Struct], *, frozen: bool) -> None:
|
|
1017
1019
|
self.struct_type = struct_type
|
|
1018
1020
|
self.fields = dataclasses.fields(struct_type)
|
|
1019
1021
|
self.field_names = [field.name for field in self.fields]
|
|
1022
|
+
self.frozen = frozen
|
|
1020
1023
|
|
|
1021
1024
|
@property
|
|
1022
1025
|
def typ(self) -> type:
|
|
1023
1026
|
return self.struct_type
|
|
1024
1027
|
|
|
1025
1028
|
@property
|
|
1026
|
-
def child_types(self) ->
|
|
1029
|
+
def child_types(self) -> list[_TypeInfo]:
|
|
1027
1030
|
return _tuple_type_from_struct(self.struct_type)._type_info.child_types
|
|
1028
1031
|
|
|
1029
1032
|
@property
|
|
@@ -1054,8 +1057,11 @@ class Struct(MutableBytes, _ABIEncoded, metaclass=_StructMeta): # type: ignore[
|
|
|
1054
1057
|
_type_info: typing.ClassVar[_StructTypeInfo] # type: ignore[misc]
|
|
1055
1058
|
|
|
1056
1059
|
def __init_subclass__(cls, *args: typing.Any, **kwargs: dict[str, typing.Any]) -> None:
|
|
1057
|
-
|
|
1058
|
-
cls
|
|
1060
|
+
# make implementation not frozen, so we can conditionally control behaviour
|
|
1061
|
+
dataclasses.dataclass(cls, *args, **{**kwargs, "frozen": False})
|
|
1062
|
+
frozen = kwargs.get("frozen", False)
|
|
1063
|
+
assert isinstance(frozen, bool)
|
|
1064
|
+
cls._type_info = _StructTypeInfo(cls, frozen=frozen)
|
|
1059
1065
|
|
|
1060
1066
|
def __post_init__(self) -> None:
|
|
1061
1067
|
# calling base class here to init Mutable
|
|
@@ -1071,6 +1077,10 @@ class Struct(MutableBytes, _ABIEncoded, metaclass=_StructMeta): # type: ignore[
|
|
|
1071
1077
|
super().__setattr__(key, value)
|
|
1072
1078
|
# don't update backing value until base class has been init'd
|
|
1073
1079
|
if hasattr(self, "_on_mutate") and key in self._type_info.field_names:
|
|
1080
|
+
if self._type_info.frozen:
|
|
1081
|
+
raise dataclasses.FrozenInstanceError(
|
|
1082
|
+
f"{type(self)} is frozen and cannot be modified"
|
|
1083
|
+
)
|
|
1074
1084
|
self._update_backing_value()
|
|
1075
1085
|
|
|
1076
1086
|
def _update_backing_value(self) -> None:
|
|
@@ -1094,6 +1104,12 @@ class Struct(MutableBytes, _ABIEncoded, metaclass=_StructMeta): # type: ignore[
|
|
|
1094
1104
|
tuple_items = tuple(getattr(self, field.name) for field in dataclasses.fields(self))
|
|
1095
1105
|
return Tuple(tuple_items)
|
|
1096
1106
|
|
|
1107
|
+
def _replace(self, **kwargs: typing.Any) -> typing.Self:
|
|
1108
|
+
copy = self.copy()
|
|
1109
|
+
for field, value in kwargs.items():
|
|
1110
|
+
setattr(copy, field, value)
|
|
1111
|
+
return copy
|
|
1112
|
+
|
|
1097
1113
|
|
|
1098
1114
|
class ARC4Client:
|
|
1099
1115
|
pass
|
|
@@ -1146,34 +1162,16 @@ def emit(event: str | Struct, /, *args: object) -> None:
|
|
|
1146
1162
|
log(event_hash[:4] + event_data.value)
|
|
1147
1163
|
|
|
1148
1164
|
|
|
1149
|
-
def native_value_to_arc4(value: object) -> _ABIEncoded: # noqa: PLR0911
|
|
1150
|
-
import algopy
|
|
1151
|
-
|
|
1152
|
-
if isinstance(value, _ABIEncoded):
|
|
1153
|
-
return value
|
|
1154
|
-
if isinstance(value, bool):
|
|
1155
|
-
return Bool(value)
|
|
1156
|
-
if isinstance(value, algopy.UInt64):
|
|
1157
|
-
return UInt64(value)
|
|
1158
|
-
if isinstance(value, algopy.BigUInt):
|
|
1159
|
-
return UInt512(value)
|
|
1160
|
-
if isinstance(value, algopy.Bytes):
|
|
1161
|
-
return DynamicBytes(value)
|
|
1162
|
-
if isinstance(value, algopy.String):
|
|
1163
|
-
return String(value)
|
|
1164
|
-
if isinstance(value, tuple):
|
|
1165
|
-
return Tuple(tuple(map(native_value_to_arc4, value)))
|
|
1166
|
-
raise TypeError(f"Unsupported type: {type(value).__name__}")
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
1165
|
def _cast_arg_as_arc4(arg: object) -> _ABIEncoded:
|
|
1166
|
+
from _algopy_testing.serialize import native_to_arc4
|
|
1167
|
+
|
|
1170
1168
|
if isinstance(arg, int) and not isinstance(arg, bool):
|
|
1171
1169
|
return UInt64(arg) if arg <= MAX_UINT64 else UInt512(arg)
|
|
1172
1170
|
if isinstance(arg, bytes):
|
|
1173
1171
|
return DynamicBytes(arg)
|
|
1174
1172
|
if isinstance(arg, str):
|
|
1175
1173
|
return String(arg)
|
|
1176
|
-
return
|
|
1174
|
+
return native_to_arc4(arg)
|
|
1177
1175
|
|
|
1178
1176
|
|
|
1179
1177
|
def _find_bool(
|
|
@@ -1237,13 +1235,13 @@ def _get_max_bytes_len(type_info: _TypeInfo) -> int:
|
|
|
1237
1235
|
size = 0
|
|
1238
1236
|
if isinstance(type_info, _DynamicArrayTypeInfo):
|
|
1239
1237
|
size += _ABI_LENGTH_SIZE
|
|
1240
|
-
elif isinstance(type_info, _TupleTypeInfo | _StaticArrayTypeInfo):
|
|
1238
|
+
elif isinstance(type_info, _TupleTypeInfo | _StructTypeInfo | _StaticArrayTypeInfo):
|
|
1241
1239
|
i = 0
|
|
1242
|
-
|
|
1243
|
-
type_info.child_types
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1240
|
+
if isinstance(type_info, _TupleTypeInfo | _StructTypeInfo):
|
|
1241
|
+
child_types = type_info.child_types
|
|
1242
|
+
else:
|
|
1243
|
+
typing.assert_type(type_info, _StaticArrayTypeInfo)
|
|
1244
|
+
child_types = [type_info.item_type] * type_info.size
|
|
1247
1245
|
while i < len(child_types):
|
|
1248
1246
|
if isinstance(child_types[i], _BoolTypeInfo):
|
|
1249
1247
|
after = _find_bool_types(child_types, i, 1)
|
{algorand_python_testing-0.4.1 → algorand_python_testing-0.5.0b1}/src/_algopy_testing/compiled.py
RENAMED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
3
|
# ruff: noqa: ARG001, PLR0913
|
|
4
|
-
import dataclasses
|
|
5
4
|
import typing
|
|
6
5
|
|
|
7
6
|
from _algopy_testing.utils import raise_mocked_function_error
|
|
@@ -12,8 +11,7 @@ if typing.TYPE_CHECKING:
|
|
|
12
11
|
import algopy
|
|
13
12
|
|
|
14
13
|
|
|
15
|
-
|
|
16
|
-
class CompiledContract:
|
|
14
|
+
class CompiledContract(typing.NamedTuple):
|
|
17
15
|
approval_program: tuple[algopy.Bytes, algopy.Bytes]
|
|
18
16
|
clear_state_program: tuple[algopy.Bytes, algopy.Bytes]
|
|
19
17
|
extra_program_pages: algopy.UInt64
|
|
@@ -23,8 +21,7 @@ class CompiledContract:
|
|
|
23
21
|
local_bytes: algopy.UInt64
|
|
24
22
|
|
|
25
23
|
|
|
26
|
-
|
|
27
|
-
class CompiledLogicSig:
|
|
24
|
+
class CompiledLogicSig(typing.NamedTuple):
|
|
28
25
|
account: algopy.Account
|
|
29
26
|
|
|
30
27
|
|
|
@@ -3,6 +3,8 @@ from __future__ import annotations
|
|
|
3
3
|
import typing
|
|
4
4
|
from collections import defaultdict
|
|
5
5
|
|
|
6
|
+
import algosdk.constants
|
|
7
|
+
|
|
6
8
|
from _algopy_testing.constants import MAX_BOX_SIZE
|
|
7
9
|
from _algopy_testing.models.account import Account
|
|
8
10
|
from _algopy_testing.primitives.uint64 import UInt64
|
|
@@ -31,7 +33,7 @@ class LedgerContext:
|
|
|
31
33
|
self._account_data = defaultdict[str, AccountContextData](get_empty_account)
|
|
32
34
|
self._app_data: dict[int, ApplicationContextData] = {}
|
|
33
35
|
self._asset_data: dict[int, AssetFields] = {}
|
|
34
|
-
self._blocks: dict[int, dict[str, int]] = {}
|
|
36
|
+
self._blocks: dict[int, dict[str, int | bytes | str]] = {}
|
|
35
37
|
self._global_fields: GlobalFields = get_default_global_fields()
|
|
36
38
|
|
|
37
39
|
self._asset_id = iter(range(1001, 2**64))
|
|
@@ -365,8 +367,19 @@ class LedgerContext:
|
|
|
365
367
|
boxes = self._get_app_data(app).boxes
|
|
366
368
|
return _as_box_key(key) in boxes
|
|
367
369
|
|
|
368
|
-
def set_block(
|
|
369
|
-
self,
|
|
370
|
+
def set_block( # noqa: PLR0913
|
|
371
|
+
self,
|
|
372
|
+
index: int,
|
|
373
|
+
seed: algopy.UInt64 | int,
|
|
374
|
+
timestamp: algopy.UInt64 | int,
|
|
375
|
+
bonus: algopy.UInt64 | int = 0,
|
|
376
|
+
branch: algopy.Bytes | bytes = b"",
|
|
377
|
+
fee_sink: algopy.Account | str = algosdk.constants.ZERO_ADDRESS,
|
|
378
|
+
fees_collected: algopy.UInt64 | int = 0,
|
|
379
|
+
proposer: algopy.Account | str = algosdk.constants.ZERO_ADDRESS,
|
|
380
|
+
proposer_payout: algopy.UInt64 | int = 0,
|
|
381
|
+
protocol: algopy.Bytes | bytes = b"",
|
|
382
|
+
txn_counter: algopy.UInt64 | int = 0,
|
|
370
383
|
) -> None:
|
|
371
384
|
"""Set block content.
|
|
372
385
|
|
|
@@ -374,10 +387,29 @@ class LedgerContext:
|
|
|
374
387
|
index (int): The block index.
|
|
375
388
|
seed (algopy.UInt64 | int): The block seed.
|
|
376
389
|
timestamp (algopy.UInt64 | int): The block timestamp.
|
|
390
|
+
bonus (algopy.UInt64 | int): The block bonus.
|
|
391
|
+
branch (algopy.Bytes | bytes): The block branch.
|
|
392
|
+
fee_sink (algopy.Account | str): The block fee sink.
|
|
393
|
+
fees_collected (algopy.UInt64 | int): The fess collected.
|
|
394
|
+
proposer (algopy.Account | str): The block proposer.
|
|
395
|
+
proposer_payout (algopy.UInt64 | int): The block proposer payout.
|
|
396
|
+
protocol (algopy.Bytes | bytes): The block protocol.
|
|
397
|
+
txn_counter (algopy.UInt64 | int): The block transaction counter.
|
|
377
398
|
"""
|
|
378
|
-
self._blocks[index] = {
|
|
379
|
-
|
|
380
|
-
|
|
399
|
+
self._blocks[index] = {
|
|
400
|
+
"seed": int(seed),
|
|
401
|
+
"timestamp": int(timestamp),
|
|
402
|
+
"bonus": int(bonus),
|
|
403
|
+
"branch": as_bytes(branch),
|
|
404
|
+
"fee_sink": str(fee_sink),
|
|
405
|
+
"fees_collected": int(fees_collected),
|
|
406
|
+
"proposer": str(proposer),
|
|
407
|
+
"proposer_payout": int(proposer_payout),
|
|
408
|
+
"protocol": as_bytes(protocol),
|
|
409
|
+
"txn_counter": int(txn_counter),
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
def get_block_content(self, index: int, key: str) -> int | bytes | str:
|
|
381
413
|
"""Get block content.
|
|
382
414
|
|
|
383
415
|
Args:
|