algorand-python-testing 0.3.0b6__tar.gz → 0.3.0b7__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.3.0b6 → algorand_python_testing-0.3.0b7}/CHANGELOG.md +2 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/PKG-INFO +1 -1
- algorand_python_testing-0.3.0b7/docs/api.md +31 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/docs/conf.py +5 -1
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/docs/coverage.md +1 -4
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/examples/zk_whitelist/test_contract.py +1 -2
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/pyproject.toml +1 -1
- {algorand_python_testing-0.3.0b6/src/algopy_testing → algorand_python_testing-0.3.0b7/src/_algopy_testing}/__init__.py +14 -15
- {algorand_python_testing-0.3.0b6/src/algopy_testing → algorand_python_testing-0.3.0b7/src/_algopy_testing}/_compiled.py +1 -1
- algorand_python_testing-0.3.0b7/src/_algopy_testing/_context_helpers/__init__.py +13 -0
- {algorand_python_testing-0.3.0b6/src/algopy_testing → algorand_python_testing-0.3.0b7/src/_algopy_testing}/_context_helpers/context_storage.py +13 -8
- {algorand_python_testing-0.3.0b6/src/algopy_testing → algorand_python_testing-0.3.0b7/src/_algopy_testing}/_context_helpers/ledger_context.py +12 -12
- {algorand_python_testing-0.3.0b6/src/algopy_testing → algorand_python_testing-0.3.0b7/src/_algopy_testing}/_context_helpers/txn_context.py +14 -12
- {algorand_python_testing-0.3.0b6/src/algopy_testing → algorand_python_testing-0.3.0b7/src/_algopy_testing}/_itxn_loader.py +2 -2
- {algorand_python_testing-0.3.0b6/src/algopy_testing → algorand_python_testing-0.3.0b7/src/_algopy_testing}/_value_generators/arc4.py +3 -3
- {algorand_python_testing-0.3.0b6/src/algopy_testing → algorand_python_testing-0.3.0b7/src/_algopy_testing}/_value_generators/avm.py +20 -21
- {algorand_python_testing-0.3.0b6/src/algopy_testing → algorand_python_testing-0.3.0b7/src/_algopy_testing}/_value_generators/txn.py +5 -5
- {algorand_python_testing-0.3.0b6/src/algopy_testing → algorand_python_testing-0.3.0b7/src/_algopy_testing}/arc4.py +7 -8
- {algorand_python_testing-0.3.0b6/src/algopy_testing → algorand_python_testing-0.3.0b7/src/_algopy_testing}/context.py +2 -2
- algorand_python_testing-0.3.0b7/src/_algopy_testing/decorators/__init__.py +8 -0
- {algorand_python_testing-0.3.0b6/src/algopy_testing → algorand_python_testing-0.3.0b7/src/_algopy_testing}/decorators/arc4.py +24 -24
- {algorand_python_testing-0.3.0b6/src/algopy_testing → algorand_python_testing-0.3.0b7/src/_algopy_testing}/enums.py +1 -1
- {algorand_python_testing-0.3.0b6/src/algopy_testing → algorand_python_testing-0.3.0b7/src/_algopy_testing}/gtxn.py +7 -7
- {algorand_python_testing-0.3.0b6/src/algopy_testing → algorand_python_testing-0.3.0b7/src/_algopy_testing}/itxn.py +5 -5
- algorand_python_testing-0.3.0b7/src/_algopy_testing/models/__init__.py +21 -0
- {algorand_python_testing-0.3.0b6/src/algopy_testing → algorand_python_testing-0.3.0b7/src/_algopy_testing}/models/account.py +6 -6
- {algorand_python_testing-0.3.0b6/src/algopy_testing → algorand_python_testing-0.3.0b7/src/_algopy_testing}/models/application.py +5 -5
- {algorand_python_testing-0.3.0b6/src/algopy_testing → algorand_python_testing-0.3.0b7/src/_algopy_testing}/models/asset.py +3 -3
- {algorand_python_testing-0.3.0b6/src/algopy_testing → algorand_python_testing-0.3.0b7/src/_algopy_testing}/models/contract.py +24 -24
- {algorand_python_testing-0.3.0b6/src/algopy_testing → algorand_python_testing-0.3.0b7/src/_algopy_testing}/models/template_variable.py +1 -1
- {algorand_python_testing-0.3.0b6/src/algopy_testing → algorand_python_testing-0.3.0b7/src/_algopy_testing}/models/txn_fields.py +8 -8
- {algorand_python_testing-0.3.0b6/src/algopy_testing → algorand_python_testing-0.3.0b7/src/_algopy_testing}/models/unsigned_builtins.py +1 -1
- {algorand_python_testing-0.3.0b6/src/algopy_testing → algorand_python_testing-0.3.0b7/src/_algopy_testing}/op/__init__.py +7 -7
- {algorand_python_testing-0.3.0b6/src/algopy_testing → algorand_python_testing-0.3.0b7/src/_algopy_testing}/op/block.py +3 -3
- {algorand_python_testing-0.3.0b6/src/algopy_testing → algorand_python_testing-0.3.0b7/src/_algopy_testing}/op/crypto.py +5 -5
- {algorand_python_testing-0.3.0b6/src/algopy_testing → algorand_python_testing-0.3.0b7/src/_algopy_testing}/op/global_values.py +3 -3
- {algorand_python_testing-0.3.0b6/src/algopy_testing → algorand_python_testing-0.3.0b7/src/_algopy_testing}/op/itxn.py +2 -2
- {algorand_python_testing-0.3.0b6/src/algopy_testing → algorand_python_testing-0.3.0b7/src/_algopy_testing}/op/misc.py +7 -7
- {algorand_python_testing-0.3.0b6/src/algopy_testing → algorand_python_testing-0.3.0b7/src/_algopy_testing}/op/pure.py +3 -3
- {algorand_python_testing-0.3.0b6/src/algopy_testing → algorand_python_testing-0.3.0b7/src/_algopy_testing}/op/txn.py +2 -2
- algorand_python_testing-0.3.0b7/src/_algopy_testing/primitives/__init__.py +6 -0
- {algorand_python_testing-0.3.0b6/src/algopy_testing → algorand_python_testing-0.3.0b7/src/_algopy_testing}/primitives/biguint.py +5 -5
- {algorand_python_testing-0.3.0b6/src/algopy_testing → algorand_python_testing-0.3.0b7/src/_algopy_testing}/primitives/bytes.py +3 -3
- {algorand_python_testing-0.3.0b6/src/algopy_testing → algorand_python_testing-0.3.0b7/src/_algopy_testing}/primitives/string.py +3 -3
- {algorand_python_testing-0.3.0b6/src/algopy_testing → algorand_python_testing-0.3.0b7/src/_algopy_testing}/primitives/uint64.py +2 -2
- algorand_python_testing-0.3.0b7/src/_algopy_testing/state/__init__.py +5 -0
- {algorand_python_testing-0.3.0b6/src/algopy_testing → algorand_python_testing-0.3.0b7/src/_algopy_testing}/state/box.py +29 -25
- {algorand_python_testing-0.3.0b6/src/algopy_testing → algorand_python_testing-0.3.0b7/src/_algopy_testing}/state/global_state.py +4 -4
- {algorand_python_testing-0.3.0b6/src/algopy_testing → algorand_python_testing-0.3.0b7/src/_algopy_testing}/state/local_state.py +5 -5
- {algorand_python_testing-0.3.0b6/src/algopy_testing → algorand_python_testing-0.3.0b7/src/_algopy_testing}/state/utils.py +5 -5
- algorand_python_testing-0.3.0b7/src/_algopy_testing/utilities/__init__.py +4 -0
- {algorand_python_testing-0.3.0b6/src/algopy_testing → algorand_python_testing-0.3.0b7/src/_algopy_testing}/utilities/budget.py +1 -1
- {algorand_python_testing-0.3.0b6/src/algopy_testing → algorand_python_testing-0.3.0b7/src/_algopy_testing}/utilities/log.py +6 -6
- {algorand_python_testing-0.3.0b6/src/algopy_testing → algorand_python_testing-0.3.0b7/src/_algopy_testing}/utils.py +13 -28
- algorand_python_testing-0.3.0b7/src/algopy/__init__.py +62 -0
- algorand_python_testing-0.3.0b7/src/algopy/arc4.py +5 -0
- algorand_python_testing-0.3.0b7/src/algopy/gtxn.py +1 -0
- algorand_python_testing-0.3.0b7/src/algopy/itxn.py +1 -0
- algorand_python_testing-0.3.0b7/src/algopy/op.py +1 -0
- algorand_python_testing-0.3.0b7/src/algopy_testing/__init__.py +25 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/arc4/test_abi_call.py +2 -2
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/arc4/test_address.py +3 -3
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/arc4/test_arc4_method_signature.py +13 -13
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/arc4/test_bool.py +2 -2
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/arc4/test_dynamic_array.py +1 -1
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/arc4/test_dynamic_bytes.py +1 -1
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/arc4/test_emit.py +2 -2
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/arc4/test_static_array.py +1 -1
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/arc4/test_string.py +2 -2
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/arc4/test_struct.py +1 -1
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/arc4/test_tuple.py +1 -1
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/arc4/test_ufixednxm.py +3 -3
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/arc4/test_uintn.py +3 -3
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/models/test_asset.py +2 -2
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/models/test_box.py +9 -9
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/models/test_box_map.py +8 -8
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/models/test_box_ref.py +7 -7
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/models/test_uenumerate.py +2 -2
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/models/test_urange.py +2 -2
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/primitives/test_biguint.py +3 -3
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/primitives/test_bytes.py +2 -2
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/primitives/test_string.py +1 -1
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/primitives/test_uint64.py +1 -1
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/state/test_global_state.py +5 -5
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/state/test_local_state.py +3 -3
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/state/test_mutations.py +4 -4
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/test_context.py +6 -6
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/test_miscellaneous_op.py +1 -1
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/test_op.py +12 -12
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/utilities/test_log.py +3 -3
- algorand_python_testing-0.3.0b7/tests/value_generators/__init__.py +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/value_generators/test_avm.py +5 -5
- algorand_python_testing-0.3.0b6/docs/api.md +0 -14
- algorand_python_testing-0.3.0b6/src/algopy/__init__.py +0 -62
- algorand_python_testing-0.3.0b6/src/algopy/arc4.py +0 -5
- algorand_python_testing-0.3.0b6/src/algopy/gtxn.py +0 -1
- algorand_python_testing-0.3.0b6/src/algopy/itxn.py +0 -1
- algorand_python_testing-0.3.0b6/src/algopy/op.py +0 -1
- algorand_python_testing-0.3.0b6/src/algopy_testing/_context_helpers/__init__.py +0 -13
- algorand_python_testing-0.3.0b6/src/algopy_testing/decorators/__init__.py +0 -8
- algorand_python_testing-0.3.0b6/src/algopy_testing/models/__init__.py +0 -21
- algorand_python_testing-0.3.0b6/src/algopy_testing/primitives/__init__.py +0 -6
- algorand_python_testing-0.3.0b6/src/algopy_testing/state/__init__.py +0 -5
- algorand_python_testing-0.3.0b6/src/algopy_testing/utilities/__init__.py +0 -4
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/.coveragerc +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/.editorconfig +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/.github/pull_request_template.md +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/.github/workflows/cd.yaml +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/.github/workflows/ci.yaml +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/.github/workflows/gh-pages.yaml +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/.gitignore +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/.pre-commit-config.yaml +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/.vscode/extensions.json +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/.vscode/launch.json +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/.vscode/settings.json +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/CONTRIBUTING.md +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/LICENSE +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/README.md +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/docs/Makefile +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/docs/__init__.py +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/docs/_static/custom.css +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/docs/algopy.md +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/docs/examples.md +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/docs/glossary.md +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/docs/index.md +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/docs/make.bat +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/docs/testing-guide/arc4-types.md +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/docs/testing-guide/avm-types.md +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/docs/testing-guide/concepts.md +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/docs/testing-guide/contract-testing.md +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/docs/testing-guide/index.md +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/docs/testing-guide/opcodes.md +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/docs/testing-guide/signature-testing.md +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/docs/testing-guide/state-management.md +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/docs/testing-guide/subroutines.md +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/docs/testing-guide/transactions.md +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/examples/README.md +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/examples/__init__.py +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/examples/auction/__init__.py +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/examples/auction/contract.py +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/examples/auction/test_contract.py +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/examples/htlc_logicsig/__init__.py +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/examples/htlc_logicsig/signature.py +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/examples/htlc_logicsig/test_signature.py +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/examples/marketplace/__init__.py +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/examples/marketplace/contract.py +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/examples/marketplace/test_contract.py +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/examples/proof_of_attendance/__init__.py +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/examples/proof_of_attendance/contract.py +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/examples/proof_of_attendance/test_contract.py +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/examples/scratch_storage/__init__.py +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/examples/scratch_storage/contract.py +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/examples/scratch_storage/test_contract.py +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/examples/simple_voting/__init__.py +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/examples/simple_voting/contract.py +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/examples/simple_voting/test_contract.py +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/examples/zk_whitelist/__init__.py +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/examples/zk_whitelist/contract.py +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/scripts/__init__.py +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/scripts/check_stubs_cov.py +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/scripts/refresh_test_artifacts.py +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/scripts/validate_examples.py +0 -0
- {algorand_python_testing-0.3.0b6/src/algopy_testing → algorand_python_testing-0.3.0b7/src/_algopy_testing}/_mutable.py +0 -0
- {algorand_python_testing-0.3.0b6/src/algopy_testing → algorand_python_testing-0.3.0b7/src/_algopy_testing}/_value_generators/__init__.py +0 -0
- {algorand_python_testing-0.3.0b6/src/algopy_testing → algorand_python_testing-0.3.0b7/src/_algopy_testing}/constants.py +0 -0
- {algorand_python_testing-0.3.0b6/src/algopy_testing → algorand_python_testing-0.3.0b7/src/_algopy_testing}/decorators/subroutine.py +0 -0
- {algorand_python_testing-0.3.0b6/src/algopy_testing → algorand_python_testing-0.3.0b7/src/_algopy_testing}/models/logicsig.py +0 -0
- {algorand_python_testing-0.3.0b6/src/algopy_testing → algorand_python_testing-0.3.0b7/src/_algopy_testing}/op/constants.py +0 -0
- {algorand_python_testing-0.3.0b6/src/algopy_testing → algorand_python_testing-0.3.0b7/src/_algopy_testing}/protocols.py +0 -0
- {algorand_python_testing-0.3.0b6/src/algopy → algorand_python_testing-0.3.0b7/src/_algopy_testing}/py.typed +0 -0
- {algorand_python_testing-0.3.0b6/src/algopy_testing → algorand_python_testing-0.3.0b7/src/algopy}/py.typed +0 -0
- /algorand_python_testing-0.3.0b6/tests/__init__.py → /algorand_python_testing-0.3.0b7/src/algopy_testing/py.typed +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/templates/.macros.j2 +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/templates/.release_notes.md.j2 +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/templates/CHANGELOG.md.j2 +0 -0
- {algorand_python_testing-0.3.0b6/tests/arc4 → algorand_python_testing-0.3.0b7/tests}/__init__.py +0 -0
- {algorand_python_testing-0.3.0b6/tests/artifacts/Arc4ABIMethod → algorand_python_testing-0.3.0b7/tests/arc4}/__init__.py +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/arc4/conftest.py +0 -0
- {algorand_python_testing-0.3.0b6/tests/artifacts/Arc4InnerTxns → algorand_python_testing-0.3.0b7/tests/artifacts/Arc4ABIMethod}/__init__.py +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/Arc4ABIMethod/contract.py +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/Arc4ABIMethod/data/SignaturesContract.approval.teal +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/Arc4ABIMethod/data/SignaturesContract.arc32.json +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/Arc4ABIMethod/data/SignaturesContract.clear.teal +0 -0
- {algorand_python_testing-0.3.0b6/tests/artifacts/Arc4PrimitiveOps → algorand_python_testing-0.3.0b7/tests/artifacts/Arc4InnerTxns}/__init__.py +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/Arc4InnerTxns/contract.py +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/Arc4InnerTxns/data/Arc4InnerTxnsContract.approval.teal +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/Arc4InnerTxns/data/Arc4InnerTxnsContract.arc32.json +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/Arc4InnerTxns/data/Arc4InnerTxnsContract.clear.teal +0 -0
- {algorand_python_testing-0.3.0b6/tests/artifacts/BoxContract → algorand_python_testing-0.3.0b7/tests/artifacts/Arc4PrimitiveOps}/__init__.py +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/Arc4PrimitiveOps/contract.py +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/Arc4PrimitiveOps/data/Arc4PrimitiveOpsContract.approval.teal +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/Arc4PrimitiveOps/data/Arc4PrimitiveOpsContract.arc32.json +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/Arc4PrimitiveOps/data/Arc4PrimitiveOpsContract.clear.teal +0 -0
- {algorand_python_testing-0.3.0b6/tests/artifacts/CryptoOps → algorand_python_testing-0.3.0b7/tests/artifacts/BoxContract}/__init__.py +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/BoxContract/contract.py +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/BoxContract/data/BoxContract.approval.teal +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/BoxContract/data/BoxContract.arc32.json +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/BoxContract/data/BoxContract.clear.teal +0 -0
- {algorand_python_testing-0.3.0b6/tests/artifacts/GlobalStateValidator → algorand_python_testing-0.3.0b7/tests/artifacts/CryptoOps}/__init__.py +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/CryptoOps/contract.py +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/CryptoOps/data/CryptoOpsContract.approval.teal +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/CryptoOps/data/CryptoOpsContract.arc32.json +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/CryptoOps/data/CryptoOpsContract.clear.teal +0 -0
- {algorand_python_testing-0.3.0b6/tests/artifacts/MiscellaneousOps → algorand_python_testing-0.3.0b7/tests/artifacts/GlobalStateValidator}/__init__.py +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/GlobalStateValidator/contract.py +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/GlobalStateValidator/data/GlobalStateValidator.approval.teal +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/GlobalStateValidator/data/GlobalStateValidator.arc32.json +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/GlobalStateValidator/data/GlobalStateValidator.clear.teal +0 -0
- {algorand_python_testing-0.3.0b6/tests/artifacts/PrimitiveOps → algorand_python_testing-0.3.0b7/tests/artifacts/MiscellaneousOps}/__init__.py +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/MiscellaneousOps/contract.py +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/MiscellaneousOps/data/MiscellaneousOpsContract.approval.teal +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/MiscellaneousOps/data/MiscellaneousOpsContract.arc32.json +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/MiscellaneousOps/data/MiscellaneousOpsContract.clear.teal +0 -0
- {algorand_python_testing-0.3.0b6/tests/artifacts/StateMutations → algorand_python_testing-0.3.0b7/tests/artifacts/PrimitiveOps}/__init__.py +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/PrimitiveOps/contract.py +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/PrimitiveOps/data/PrimitiveOpsContract.approval.teal +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/PrimitiveOps/data/PrimitiveOpsContract.arc32.json +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/PrimitiveOps/data/PrimitiveOpsContract.clear.teal +0 -0
- {algorand_python_testing-0.3.0b6/tests/artifacts/StateOps → algorand_python_testing-0.3.0b7/tests/artifacts/StateMutations}/__init__.py +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/StateMutations/data/Contract.approval.teal +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/StateMutations/data/Contract.arc32.json +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/StateMutations/data/Contract.clear.teal +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/StateMutations/statemutations.py +0 -0
- {algorand_python_testing-0.3.0b6/tests/artifacts → algorand_python_testing-0.3.0b7/tests/artifacts/StateOps}/__init__.py +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/StateOps/contract.py +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/StateOps/data/GlobalStateContract.approval.teal +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/StateOps/data/GlobalStateContract.arc32.json +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/StateOps/data/GlobalStateContract.clear.teal +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/StateOps/data/ITxnOpsContract.approval.teal +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/StateOps/data/ITxnOpsContract.arc32.json +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/StateOps/data/ITxnOpsContract.clear.teal +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/StateOps/data/LocalStateContract.approval.teal +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/StateOps/data/LocalStateContract.arc32.json +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/StateOps/data/LocalStateContract.clear.teal +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/StateOps/data/StateAcctParamsGet.approval.teal +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/StateOps/data/StateAcctParamsGet.arc32.json +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/StateOps/data/StateAcctParamsGet.clear.teal +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/StateOps/data/StateAcctParamsGetContract.approval.teal +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/StateOps/data/StateAcctParamsGetContract.arc32.json +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/StateOps/data/StateAcctParamsGetContract.clear.teal +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/StateOps/data/StateAppGlobalContract.approval.teal +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/StateOps/data/StateAppGlobalContract.arc32.json +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/StateOps/data/StateAppGlobalContract.clear.teal +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/StateOps/data/StateAppGlobalExContract.approval.teal +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/StateOps/data/StateAppGlobalExContract.arc32.json +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/StateOps/data/StateAppGlobalExContract.clear.teal +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/StateOps/data/StateAppLocalContract.approval.teal +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/StateOps/data/StateAppLocalContract.arc32.json +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/StateOps/data/StateAppLocalContract.clear.teal +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/StateOps/data/StateAppLocalExContract.approval.teal +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/StateOps/data/StateAppLocalExContract.arc32.json +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/StateOps/data/StateAppLocalExContract.clear.teal +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/StateOps/data/StateAppParamsContract.approval.teal +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/StateOps/data/StateAppParamsContract.arc32.json +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/StateOps/data/StateAppParamsContract.clear.teal +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/StateOps/data/StateAssetHoldingContract.approval.teal +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/StateOps/data/StateAssetHoldingContract.arc32.json +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/StateOps/data/StateAssetHoldingContract.clear.teal +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/StateOps/data/StateAssetParamsContract.approval.teal +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/StateOps/data/StateAssetParamsContract.arc32.json +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/artifacts/StateOps/data/StateAssetParamsContract.clear.teal +0 -0
- {algorand_python_testing-0.3.0b6/tests/contexts → algorand_python_testing-0.3.0b7/tests/artifacts}/__init__.py +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/common.py +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/conftest.py +0 -0
- {algorand_python_testing-0.3.0b6/tests/models → algorand_python_testing-0.3.0b7/tests/contexts}/__init__.py +0 -0
- {algorand_python_testing-0.3.0b6/tests/primitives → algorand_python_testing-0.3.0b7/tests/models}/__init__.py +0 -0
- {algorand_python_testing-0.3.0b6/tests/state → algorand_python_testing-0.3.0b7/tests/primitives}/__init__.py +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/primitives/conftest.py +0 -0
- {algorand_python_testing-0.3.0b6/tests/utilities → algorand_python_testing-0.3.0b7/tests/state}/__init__.py +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/state/conftest.py +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/util.py +0 -0
- {algorand_python_testing-0.3.0b6/tests/value_generators → algorand_python_testing-0.3.0b7/tests/utilities}/__init__.py +0 -0
- {algorand_python_testing-0.3.0b6 → algorand_python_testing-0.3.0b7}/tests/utilities/conftest.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: algorand-python-testing
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.0b7
|
|
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
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# API Reference
|
|
2
|
+
|
|
3
|
+
## Contexts
|
|
4
|
+
|
|
5
|
+
```{autodoc2-summary}
|
|
6
|
+
algopy_testing.AlgopyTestContext
|
|
7
|
+
algopy_testing.LedgerContext
|
|
8
|
+
algopy_testing.TransactionContext
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Value Generators
|
|
12
|
+
|
|
13
|
+
```{autodoc2-summary}
|
|
14
|
+
algopy_testing.AVMValueGenerator
|
|
15
|
+
algopy_testing.ARC4ValueGenerator
|
|
16
|
+
algopy_testing.TxnValueGenerator
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Inner transaction loaders
|
|
20
|
+
|
|
21
|
+
```{autodoc2-summary}
|
|
22
|
+
algopy_testing.ITxnGroupLoader
|
|
23
|
+
algopy_testing.ITxnLoader
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Utils
|
|
27
|
+
|
|
28
|
+
```{autodoc2-summary}
|
|
29
|
+
algopy_testing.algopy_testing_context
|
|
30
|
+
algopy_testing.arc4_prefix
|
|
31
|
+
```
|
|
@@ -61,7 +61,11 @@ myst_enable_extensions = ["colon_fence", "fieldlist"]
|
|
|
61
61
|
autodoc2_packages = [
|
|
62
62
|
{
|
|
63
63
|
"path": "../src/algopy_testing",
|
|
64
|
-
"auto_mode":
|
|
64
|
+
"auto_mode": True,
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
"path": "../src/_algopy_testing",
|
|
68
|
+
"auto_mode": True,
|
|
65
69
|
},
|
|
66
70
|
]
|
|
67
71
|
autodoc2_render_plugin = "myst"
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
# Coverage
|
|
2
2
|
|
|
3
|
-
See which `algorand-python` stubs are implemented by the `algorand-python-testing` library. See the [Concepts](testing-guide/concepts.md#types-of-algopy-stub-implementations) section for more details on the implementation categories.
|
|
4
|
-
|
|
5
|
-
Based on the definitions provided and the implementation details in the `src` directory, here is the classification for the abstractions outlined in the table under the `Name` column:
|
|
3
|
+
See which `algorand-python` stubs are implemented by the `algorand-python-testing` library. See the [Concepts](testing-guide/concepts.md#types-of-algopy-stub-implementations) section for more details on the implementation categories. Refer to the [`algorand-python` stubs API](api.md) for the full list of the stubs for which the `algorand-python-testing` library provides implementations referenced in the table below.
|
|
6
4
|
|
|
7
5
|
| Name | Implementation type |
|
|
8
6
|
| ------------------------------------------- | ------------------- |
|
|
@@ -159,4 +157,3 @@ Based on the definitions provided and the implementation details in the `src` di
|
|
|
159
157
|
| algopy.op.EllipticCurve | Mockable |
|
|
160
158
|
| algopy.op.VrfVerify | Mockable |
|
|
161
159
|
| algopy.op.vrf_verify | Mockable |
|
|
162
|
-
|
|
@@ -3,8 +3,7 @@ from collections.abc import Generator
|
|
|
3
3
|
|
|
4
4
|
import algopy
|
|
5
5
|
import pytest
|
|
6
|
-
from algopy_testing import AlgopyTestContext, algopy_testing_context
|
|
7
|
-
from algopy_testing.utils import arc4_prefix
|
|
6
|
+
from algopy_testing import AlgopyTestContext, algopy_testing_context, arc4_prefix
|
|
8
7
|
|
|
9
8
|
from .contract import ZkWhitelistContract
|
|
10
9
|
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
from
|
|
2
|
-
from
|
|
3
|
-
from
|
|
4
|
-
from
|
|
5
|
-
from
|
|
6
|
-
from
|
|
7
|
-
from
|
|
8
|
-
from
|
|
9
|
-
from
|
|
10
|
-
from
|
|
11
|
-
from
|
|
12
|
-
from
|
|
1
|
+
from _algopy_testing import arc4, gtxn, itxn
|
|
2
|
+
from _algopy_testing._context_helpers.context_storage import algopy_testing_context
|
|
3
|
+
from _algopy_testing._context_helpers.ledger_context import LedgerContext
|
|
4
|
+
from _algopy_testing._context_helpers.txn_context import TransactionContext
|
|
5
|
+
from _algopy_testing._itxn_loader import ITxnGroupLoader, ITxnLoader
|
|
6
|
+
from _algopy_testing._value_generators.arc4 import ARC4ValueGenerator
|
|
7
|
+
from _algopy_testing._value_generators.avm import AVMValueGenerator
|
|
8
|
+
from _algopy_testing._value_generators.txn import TxnValueGenerator
|
|
9
|
+
from _algopy_testing.context import AlgopyTestContext
|
|
10
|
+
from _algopy_testing.decorators.subroutine import subroutine
|
|
11
|
+
from _algopy_testing.enums import OnCompleteAction, TransactionType
|
|
12
|
+
from _algopy_testing.models import (
|
|
13
13
|
Account,
|
|
14
14
|
Application,
|
|
15
15
|
ARC4Contract,
|
|
@@ -22,8 +22,8 @@ from algopy_testing.models import (
|
|
|
22
22
|
uenumerate,
|
|
23
23
|
urange,
|
|
24
24
|
)
|
|
25
|
-
from
|
|
26
|
-
from
|
|
25
|
+
from _algopy_testing.primitives import BigUInt, Bytes, String, UInt64
|
|
26
|
+
from _algopy_testing.state import Box, BoxMap, BoxRef, GlobalState, LocalState
|
|
27
27
|
|
|
28
28
|
# TODO: clean up and ensure only algopy_testing namespace specific user facing abstractions
|
|
29
29
|
# are exposed Only keep the _value_generators, ledger_context, txn_context,
|
|
@@ -62,7 +62,6 @@ __all__ = [
|
|
|
62
62
|
"gtxn",
|
|
63
63
|
"itxn",
|
|
64
64
|
"logicsig",
|
|
65
|
-
"op",
|
|
66
65
|
"subroutine",
|
|
67
66
|
"uenumerate",
|
|
68
67
|
"urange",
|
|
@@ -4,7 +4,7 @@ from __future__ import annotations
|
|
|
4
4
|
import dataclasses
|
|
5
5
|
import typing
|
|
6
6
|
|
|
7
|
-
from
|
|
7
|
+
from _algopy_testing.utils import raise_mocked_function_error
|
|
8
8
|
|
|
9
9
|
if typing.TYPE_CHECKING:
|
|
10
10
|
from collections.abc import Mapping
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
from _algopy_testing._context_helpers.context_storage import (
|
|
2
|
+
algopy_testing_context,
|
|
3
|
+
lazy_context,
|
|
4
|
+
)
|
|
5
|
+
from _algopy_testing._context_helpers.ledger_context import LedgerContext
|
|
6
|
+
from _algopy_testing._context_helpers.txn_context import TransactionContext
|
|
7
|
+
|
|
8
|
+
__all__ = [
|
|
9
|
+
"LedgerContext",
|
|
10
|
+
"TransactionContext",
|
|
11
|
+
"algopy_testing_context",
|
|
12
|
+
"lazy_context",
|
|
13
|
+
]
|
|
@@ -9,13 +9,13 @@ if typing.TYPE_CHECKING:
|
|
|
9
9
|
|
|
10
10
|
import algopy
|
|
11
11
|
|
|
12
|
-
from
|
|
13
|
-
from
|
|
14
|
-
from
|
|
15
|
-
from
|
|
16
|
-
from
|
|
17
|
-
from
|
|
18
|
-
from
|
|
12
|
+
from _algopy_testing._context_helpers.ledger_context import LedgerContext
|
|
13
|
+
from _algopy_testing._context_helpers.txn_context import TransactionContext, TransactionGroup
|
|
14
|
+
from _algopy_testing._value_generators import AlgopyValueGenerator
|
|
15
|
+
from _algopy_testing.context import AlgopyTestContext
|
|
16
|
+
from _algopy_testing.models.account import AccountContextData
|
|
17
|
+
from _algopy_testing.models.application import ApplicationContextData
|
|
18
|
+
from _algopy_testing.models.asset import AssetFields
|
|
19
19
|
|
|
20
20
|
_var: ContextVar[AlgopyTestContext] = ContextVar("_var")
|
|
21
21
|
|
|
@@ -97,7 +97,12 @@ def algopy_testing_context(
|
|
|
97
97
|
*,
|
|
98
98
|
default_sender: str | None = None,
|
|
99
99
|
) -> Generator[AlgopyTestContext, None, None]:
|
|
100
|
-
|
|
100
|
+
"""Context manager for the AlgopyTestContext.
|
|
101
|
+
|
|
102
|
+
Args:
|
|
103
|
+
default_sender: The default sender for the context.
|
|
104
|
+
"""
|
|
105
|
+
from _algopy_testing.context import AlgopyTestContext
|
|
101
106
|
|
|
102
107
|
token = _var.set(
|
|
103
108
|
AlgopyTestContext(
|
|
@@ -3,25 +3,25 @@ from __future__ import annotations
|
|
|
3
3
|
import typing
|
|
4
4
|
from collections import defaultdict
|
|
5
5
|
|
|
6
|
-
from
|
|
7
|
-
from
|
|
8
|
-
from
|
|
9
|
-
from
|
|
6
|
+
from _algopy_testing.constants import MAX_BOX_SIZE
|
|
7
|
+
from _algopy_testing.models.account import Account
|
|
8
|
+
from _algopy_testing.primitives.uint64 import UInt64
|
|
9
|
+
from _algopy_testing.utils import as_bytes, assert_address_is_valid, get_default_global_fields
|
|
10
10
|
|
|
11
11
|
if typing.TYPE_CHECKING:
|
|
12
12
|
import algopy
|
|
13
13
|
|
|
14
|
-
from
|
|
15
|
-
from
|
|
16
|
-
from
|
|
17
|
-
from
|
|
14
|
+
from _algopy_testing.models.account import AccountFields
|
|
15
|
+
from _algopy_testing.models.application import ApplicationContextData, ApplicationFields
|
|
16
|
+
from _algopy_testing.models.asset import AssetFields
|
|
17
|
+
from _algopy_testing.op.global_values import GlobalFields
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
class LedgerContext:
|
|
21
21
|
"""Context for managing the ledger state."""
|
|
22
22
|
|
|
23
23
|
def __init__(self) -> None:
|
|
24
|
-
from
|
|
24
|
+
from _algopy_testing.models.account import AccountContextData, get_empty_account
|
|
25
25
|
|
|
26
26
|
self.account_data = defaultdict[str, AccountContextData](get_empty_account)
|
|
27
27
|
self.app_data: dict[int, ApplicationContextData] = {}
|
|
@@ -374,7 +374,7 @@ class LedgerContext:
|
|
|
374
374
|
Raises:
|
|
375
375
|
AttributeError: If invalid fields are provided.
|
|
376
376
|
"""
|
|
377
|
-
from
|
|
377
|
+
from _algopy_testing.op.global_values import GlobalFields
|
|
378
378
|
|
|
379
379
|
invalid_keys = global_fields.keys() - GlobalFields.__annotations__.keys()
|
|
380
380
|
|
|
@@ -436,8 +436,8 @@ def _get_app_id(app: algopy.UInt64 | algopy.Application | algopy.Contract | int)
|
|
|
436
436
|
Raises:
|
|
437
437
|
TypeError: If an invalid type is provided.
|
|
438
438
|
"""
|
|
439
|
-
from
|
|
440
|
-
from
|
|
439
|
+
from _algopy_testing.models import Application, Contract
|
|
440
|
+
from _algopy_testing.primitives import UInt64
|
|
441
441
|
|
|
442
442
|
if isinstance(app, Contract):
|
|
443
443
|
app_id = app.__app_id__
|
|
@@ -5,30 +5,30 @@ import typing
|
|
|
5
5
|
|
|
6
6
|
import algosdk
|
|
7
7
|
|
|
8
|
-
from
|
|
9
|
-
from
|
|
8
|
+
from _algopy_testing._itxn_loader import ITxnGroupLoader
|
|
9
|
+
from _algopy_testing.decorators.arc4 import (
|
|
10
10
|
check_routing_conditions,
|
|
11
11
|
create_abimethod_txns,
|
|
12
12
|
create_baremethod_txns,
|
|
13
13
|
get_arc4_metadata,
|
|
14
14
|
get_ordered_args,
|
|
15
15
|
)
|
|
16
|
-
from
|
|
16
|
+
from _algopy_testing.enums import OnCompleteAction
|
|
17
17
|
|
|
18
18
|
if typing.TYPE_CHECKING:
|
|
19
19
|
from collections.abc import Callable, Iterator, Sequence
|
|
20
20
|
|
|
21
21
|
import algopy
|
|
22
22
|
|
|
23
|
-
from
|
|
24
|
-
from
|
|
23
|
+
from _algopy_testing._itxn_loader import InnerTransactionResultType
|
|
24
|
+
from _algopy_testing.models.txn_fields import ActiveTransactionFields
|
|
25
25
|
|
|
26
|
-
from
|
|
27
|
-
from
|
|
28
|
-
from
|
|
29
|
-
from
|
|
30
|
-
from
|
|
31
|
-
from
|
|
26
|
+
from _algopy_testing import gtxn
|
|
27
|
+
from _algopy_testing._itxn_loader import ITxnLoader
|
|
28
|
+
from _algopy_testing.gtxn import TransactionBase
|
|
29
|
+
from _algopy_testing.itxn import InnerTransaction, submit_txns
|
|
30
|
+
from _algopy_testing.models import Application
|
|
31
|
+
from _algopy_testing.primitives import UInt64
|
|
32
32
|
|
|
33
33
|
TReturn = typing.TypeVar("TReturn")
|
|
34
34
|
TParamSpec = typing.ParamSpec("TParamSpec")
|
|
@@ -56,6 +56,8 @@ class DeferredAppCall(typing.Generic[TReturn]):
|
|
|
56
56
|
|
|
57
57
|
|
|
58
58
|
class TransactionContext:
|
|
59
|
+
"""Context for managing transaction groups and active transactions."""
|
|
60
|
+
|
|
59
61
|
def __init__(self) -> None:
|
|
60
62
|
self._groups: list[TransactionGroup] = []
|
|
61
63
|
self._active_group: TransactionGroup | None = None
|
|
@@ -91,7 +93,7 @@ class TransactionContext:
|
|
|
91
93
|
) -> DeferredAppCall[TReturn]:
|
|
92
94
|
r"""Prepare an application call transaction group for a contract method without
|
|
93
95
|
executing it."""
|
|
94
|
-
from
|
|
96
|
+
from _algopy_testing.models import ARC4Contract
|
|
95
97
|
|
|
96
98
|
arc4_metadata = get_arc4_metadata(method)
|
|
97
99
|
# unwrap instance method
|
|
@@ -2,8 +2,8 @@ from __future__ import annotations
|
|
|
2
2
|
|
|
3
3
|
import typing
|
|
4
4
|
|
|
5
|
-
from
|
|
6
|
-
from
|
|
5
|
+
from _algopy_testing import itxn
|
|
6
|
+
from _algopy_testing.enums import TransactionType
|
|
7
7
|
|
|
8
8
|
if typing.TYPE_CHECKING:
|
|
9
9
|
from collections.abc import Sequence
|
|
@@ -6,9 +6,9 @@ import typing
|
|
|
6
6
|
|
|
7
7
|
import algosdk
|
|
8
8
|
|
|
9
|
-
from
|
|
10
|
-
from
|
|
11
|
-
from
|
|
9
|
+
from _algopy_testing import arc4
|
|
10
|
+
from _algopy_testing.constants import MAX_UINT8, MAX_UINT16, MAX_UINT32, MAX_UINT64, MAX_UINT512
|
|
11
|
+
from _algopy_testing.utils import generate_random_int
|
|
12
12
|
|
|
13
13
|
if typing.TYPE_CHECKING:
|
|
14
14
|
import algopy
|
|
@@ -7,18 +7,18 @@ from collections import ChainMap
|
|
|
7
7
|
|
|
8
8
|
import algosdk
|
|
9
9
|
|
|
10
|
-
import
|
|
11
|
-
from
|
|
12
|
-
from
|
|
10
|
+
import _algopy_testing
|
|
11
|
+
from _algopy_testing._context_helpers import lazy_context
|
|
12
|
+
from _algopy_testing.constants import (
|
|
13
13
|
ALWAYS_APPROVE_TEAL_PROGRAM,
|
|
14
14
|
MAX_BYTES_SIZE,
|
|
15
15
|
MAX_UINT64,
|
|
16
16
|
MAX_UINT512,
|
|
17
17
|
)
|
|
18
|
-
from
|
|
19
|
-
from
|
|
20
|
-
from
|
|
21
|
-
from
|
|
18
|
+
from _algopy_testing.models.account import AccountFields
|
|
19
|
+
from _algopy_testing.models.application import ApplicationContextData, ApplicationFields
|
|
20
|
+
from _algopy_testing.models.asset import AssetFields
|
|
21
|
+
from _algopy_testing.utils import generate_random_int
|
|
22
22
|
|
|
23
23
|
if typing.TYPE_CHECKING:
|
|
24
24
|
import algopy
|
|
@@ -43,7 +43,7 @@ class AVMValueGenerator:
|
|
|
43
43
|
if min_value < 0 or max_value < 0:
|
|
44
44
|
raise ValueError("min_value and max_value must be greater than or equal to 0")
|
|
45
45
|
|
|
46
|
-
return
|
|
46
|
+
return _algopy_testing.UInt64(generate_random_int(min_value, max_value))
|
|
47
47
|
|
|
48
48
|
def biguint(self, min_value: int = 0) -> algopy.BigUInt:
|
|
49
49
|
"""Generate a random BigUInt value within a specified range.
|
|
@@ -55,7 +55,7 @@ class AVMValueGenerator:
|
|
|
55
55
|
if min_value < 0:
|
|
56
56
|
raise ValueError("min_value must be greater than or equal to 0")
|
|
57
57
|
|
|
58
|
-
return
|
|
58
|
+
return _algopy_testing.BigUInt(generate_random_int(min_value, MAX_UINT512))
|
|
59
59
|
|
|
60
60
|
def bytes(self, length: int | None = None) -> algopy.Bytes:
|
|
61
61
|
"""Generate a random byte sequence of a specified length.
|
|
@@ -64,7 +64,7 @@ class AVMValueGenerator:
|
|
|
64
64
|
:returns: The randomly generated byte sequence.
|
|
65
65
|
"""
|
|
66
66
|
length = length or MAX_BYTES_SIZE
|
|
67
|
-
return
|
|
67
|
+
return _algopy_testing.Bytes(secrets.token_bytes(length))
|
|
68
68
|
|
|
69
69
|
def string(self, length: int = MAX_BYTES_SIZE) -> algopy.String:
|
|
70
70
|
"""Generate a random string of a specified length.
|
|
@@ -72,7 +72,7 @@ class AVMValueGenerator:
|
|
|
72
72
|
:param length: int: (Default value = MAX_BYTES_SIZE)
|
|
73
73
|
:returns: The randomly generated string.
|
|
74
74
|
"""
|
|
75
|
-
return
|
|
75
|
+
return _algopy_testing.String(
|
|
76
76
|
"".join(secrets.choice(string.ascii_uppercase + string.digits) for _ in range(length))
|
|
77
77
|
)
|
|
78
78
|
|
|
@@ -146,7 +146,6 @@ class AVMValueGenerator:
|
|
|
146
146
|
**application_fields: typing.Unpack[ApplicationFields],
|
|
147
147
|
) -> algopy.Application:
|
|
148
148
|
r"""Generate and add a new application with a unique ID."""
|
|
149
|
-
import algopy_testing
|
|
150
149
|
|
|
151
150
|
new_app_id = id if id is not None else lazy_context.ledger.get_next_app_id()
|
|
152
151
|
|
|
@@ -159,20 +158,20 @@ class AVMValueGenerator:
|
|
|
159
158
|
if key not in ApplicationFields.__annotations__:
|
|
160
159
|
raise AttributeError(f"Invalid field '{key}' for Application")
|
|
161
160
|
|
|
162
|
-
new_app =
|
|
161
|
+
new_app = _algopy_testing.Application(new_app_id)
|
|
163
162
|
|
|
164
163
|
# Set sensible defaults
|
|
165
164
|
app_fields: ApplicationFields = {
|
|
166
|
-
"approval_program":
|
|
167
|
-
"clear_state_program":
|
|
168
|
-
"global_num_uint":
|
|
169
|
-
"global_num_bytes":
|
|
170
|
-
"local_num_uint":
|
|
171
|
-
"local_num_bytes":
|
|
172
|
-
"extra_program_pages":
|
|
165
|
+
"approval_program": _algopy_testing.Bytes(ALWAYS_APPROVE_TEAL_PROGRAM),
|
|
166
|
+
"clear_state_program": _algopy_testing.Bytes(ALWAYS_APPROVE_TEAL_PROGRAM),
|
|
167
|
+
"global_num_uint": _algopy_testing.UInt64(0),
|
|
168
|
+
"global_num_bytes": _algopy_testing.UInt64(0),
|
|
169
|
+
"local_num_uint": _algopy_testing.UInt64(0),
|
|
170
|
+
"local_num_bytes": _algopy_testing.UInt64(0),
|
|
171
|
+
"extra_program_pages": _algopy_testing.UInt64(0),
|
|
173
172
|
"creator": lazy_context.value.default_sender,
|
|
174
173
|
"address": address
|
|
175
|
-
or
|
|
174
|
+
or _algopy_testing.Account(algosdk.logic.get_application_address(new_app_id)),
|
|
176
175
|
}
|
|
177
176
|
|
|
178
177
|
# Merge provided fields with defaults, prioritizing provided fields
|
|
@@ -2,15 +2,15 @@ from __future__ import annotations
|
|
|
2
2
|
|
|
3
3
|
import typing
|
|
4
4
|
|
|
5
|
-
from
|
|
6
|
-
from
|
|
7
|
-
from
|
|
8
|
-
from
|
|
5
|
+
from _algopy_testing import gtxn
|
|
6
|
+
from _algopy_testing._context_helpers import lazy_context
|
|
7
|
+
from _algopy_testing.models.application import Application
|
|
8
|
+
from _algopy_testing.models.txn_fields import get_txn_defaults
|
|
9
9
|
|
|
10
10
|
if typing.TYPE_CHECKING:
|
|
11
11
|
import algopy
|
|
12
12
|
|
|
13
|
-
from
|
|
13
|
+
from _algopy_testing.models.txn_fields import (
|
|
14
14
|
ApplicationCallFields,
|
|
15
15
|
AssetConfigFields,
|
|
16
16
|
AssetFreezeFields,
|
|
@@ -8,22 +8,22 @@ import typing
|
|
|
8
8
|
import algosdk
|
|
9
9
|
from Cryptodome.Hash import SHA512
|
|
10
10
|
|
|
11
|
-
from
|
|
11
|
+
from _algopy_testing._mutable import (
|
|
12
12
|
MutableBytes,
|
|
13
13
|
add_mutable_callback,
|
|
14
14
|
set_item_on_mutate,
|
|
15
15
|
)
|
|
16
|
-
from
|
|
16
|
+
from _algopy_testing.constants import (
|
|
17
17
|
ARC4_RETURN_PREFIX,
|
|
18
18
|
BITS_IN_BYTE,
|
|
19
19
|
MAX_UINT64,
|
|
20
20
|
UINT64_SIZE,
|
|
21
21
|
UINT512_SIZE,
|
|
22
22
|
)
|
|
23
|
-
from
|
|
24
|
-
from
|
|
25
|
-
from
|
|
26
|
-
from
|
|
23
|
+
from _algopy_testing.models.account import Account
|
|
24
|
+
from _algopy_testing.primitives import Bytes
|
|
25
|
+
from _algopy_testing.protocols import BytesBacked
|
|
26
|
+
from _algopy_testing.utils import (
|
|
27
27
|
as_bytes,
|
|
28
28
|
as_int,
|
|
29
29
|
as_int16,
|
|
@@ -1150,7 +1150,6 @@ class ARC4Client:
|
|
|
1150
1150
|
|
|
1151
1151
|
|
|
1152
1152
|
class _ABICall:
|
|
1153
|
-
|
|
1154
1153
|
def __init__(self, func_name: str) -> None:
|
|
1155
1154
|
self.func_name = func_name
|
|
1156
1155
|
|
|
@@ -1175,7 +1174,7 @@ arc4_update = _ABICall("arc4_update")
|
|
|
1175
1174
|
|
|
1176
1175
|
|
|
1177
1176
|
def emit(event: str | Struct, /, *args: object) -> None:
|
|
1178
|
-
from
|
|
1177
|
+
from _algopy_testing.utilities.log import log
|
|
1179
1178
|
|
|
1180
1179
|
if isinstance(event, str):
|
|
1181
1180
|
arc4_args = tuple(_cast_arg_as_arc4(arg) for arg in args)
|
|
@@ -4,8 +4,8 @@ import typing
|
|
|
4
4
|
|
|
5
5
|
import algosdk
|
|
6
6
|
|
|
7
|
-
from
|
|
8
|
-
from
|
|
7
|
+
from _algopy_testing._context_helpers import LedgerContext, TransactionContext
|
|
8
|
+
from _algopy_testing._value_generators import AlgopyValueGenerator
|
|
9
9
|
|
|
10
10
|
if typing.TYPE_CHECKING:
|
|
11
11
|
from collections.abc import Sequence
|
|
@@ -8,11 +8,11 @@ import typing
|
|
|
8
8
|
|
|
9
9
|
import algosdk
|
|
10
10
|
|
|
11
|
-
import
|
|
12
|
-
from
|
|
13
|
-
from
|
|
14
|
-
from
|
|
15
|
-
from
|
|
11
|
+
import _algopy_testing
|
|
12
|
+
from _algopy_testing._context_helpers import lazy_context
|
|
13
|
+
from _algopy_testing.constants import ALWAYS_APPROVE_TEAL_PROGRAM
|
|
14
|
+
from _algopy_testing.enums import OnCompleteAction
|
|
15
|
+
from _algopy_testing.primitives import BigUInt, Bytes, String, UInt64
|
|
16
16
|
|
|
17
17
|
_P = typing.ParamSpec("_P")
|
|
18
18
|
_R = typing.TypeVar("_R")
|
|
@@ -167,7 +167,7 @@ def abimethod( # noqa: PLR0913
|
|
|
167
167
|
@functools.wraps(fn)
|
|
168
168
|
def wrapper(*args: _P.args, **kwargs: _P.kwargs) -> _R:
|
|
169
169
|
contract, *app_args = args
|
|
170
|
-
assert isinstance(contract,
|
|
170
|
+
assert isinstance(contract, _algopy_testing.ARC4Contract), "expected ARC4 contract"
|
|
171
171
|
assert fn is not None, "expected function"
|
|
172
172
|
app_id = contract.__app_id__
|
|
173
173
|
|
|
@@ -224,10 +224,10 @@ def create_abimethod_txns(
|
|
|
224
224
|
# at some point could get the actual values by using puya to compile the contract
|
|
225
225
|
# this should be opt-in behaviour, as that it would be too slow to always do
|
|
226
226
|
txn_fields.setdefault(
|
|
227
|
-
"approval_program_pages", [
|
|
227
|
+
"approval_program_pages", [_algopy_testing.Bytes(ALWAYS_APPROVE_TEAL_PROGRAM)]
|
|
228
228
|
)
|
|
229
229
|
txn_fields.setdefault(
|
|
230
|
-
"clear_state_program_pages", [
|
|
230
|
+
"clear_state_program_pages", [_algopy_testing.Bytes(ALWAYS_APPROVE_TEAL_PROGRAM)]
|
|
231
231
|
)
|
|
232
232
|
|
|
233
233
|
app_txn = lazy_context.any.txn.application_call(**txn_fields)
|
|
@@ -241,10 +241,10 @@ def create_baremethod_txns(app_id: int) -> list[algopy.gtxn.TransactionBase]:
|
|
|
241
241
|
txn_fields.setdefault("app_id", contract_app)
|
|
242
242
|
|
|
243
243
|
txn_fields.setdefault(
|
|
244
|
-
"approval_program_pages", [
|
|
244
|
+
"approval_program_pages", [_algopy_testing.Bytes(ALWAYS_APPROVE_TEAL_PROGRAM)]
|
|
245
245
|
)
|
|
246
246
|
txn_fields.setdefault(
|
|
247
|
-
"clear_state_program_pages", [
|
|
247
|
+
"clear_state_program_pages", [_algopy_testing.Bytes(ALWAYS_APPROVE_TEAL_PROGRAM)]
|
|
248
248
|
)
|
|
249
249
|
txn_fields.setdefault("sender", lazy_context.value.default_sender)
|
|
250
250
|
return [
|
|
@@ -269,26 +269,26 @@ def _extract_arrays_from_args(
|
|
|
269
269
|
app: algopy.Application,
|
|
270
270
|
sender: algopy.Account,
|
|
271
271
|
) -> _TxnArrays:
|
|
272
|
-
txns = list[
|
|
272
|
+
txns = list[_algopy_testing.gtxn.TransactionBase]()
|
|
273
273
|
apps = [app]
|
|
274
|
-
assets = list[
|
|
274
|
+
assets = list[_algopy_testing.Asset]()
|
|
275
275
|
accounts = [sender]
|
|
276
276
|
app_args = [method_selector]
|
|
277
277
|
for arg in args:
|
|
278
278
|
match arg:
|
|
279
|
-
case
|
|
279
|
+
case _algopy_testing.gtxn.TransactionBase() as txn:
|
|
280
280
|
txns.append(txn)
|
|
281
|
-
case
|
|
282
|
-
app_args.append(
|
|
281
|
+
case _algopy_testing.Account() as acc:
|
|
282
|
+
app_args.append(_algopy_testing.arc4.UInt8(len(accounts)).bytes)
|
|
283
283
|
accounts.append(acc)
|
|
284
|
-
case
|
|
285
|
-
app_args.append(
|
|
284
|
+
case _algopy_testing.Asset() as asset:
|
|
285
|
+
app_args.append(_algopy_testing.arc4.UInt8(len(assets)).bytes)
|
|
286
286
|
assets.append(asset)
|
|
287
|
-
case
|
|
288
|
-
app_args.append(
|
|
287
|
+
case _algopy_testing.Application() as arg_app:
|
|
288
|
+
app_args.append(_algopy_testing.arc4.UInt8(len(apps)).bytes)
|
|
289
289
|
apps.append(arg_app)
|
|
290
290
|
case _ as maybe_native:
|
|
291
|
-
app_args.append(
|
|
291
|
+
app_args.append(_algopy_testing.arc4.native_value_to_arc4(maybe_native).bytes)
|
|
292
292
|
if len(app_args) > 16:
|
|
293
293
|
# TODO:1.0 pack extra args into an ARC4 tuple
|
|
294
294
|
raise NotImplementedError
|
|
@@ -313,9 +313,9 @@ def _generate_arc4_signature_from_fn(fn: typing.Callable[_P, _R], arc4_name: str
|
|
|
313
313
|
|
|
314
314
|
|
|
315
315
|
def _type_to_arc4(annotation: types.GenericAlias | type | None) -> str: # noqa: PLR0911, PLR0912
|
|
316
|
-
from
|
|
317
|
-
from
|
|
318
|
-
from
|
|
316
|
+
from _algopy_testing.arc4 import _ABIEncoded
|
|
317
|
+
from _algopy_testing.gtxn import Transaction, TransactionBase
|
|
318
|
+
from _algopy_testing.models import Account, Application, Asset
|
|
319
319
|
|
|
320
320
|
if annotation is None:
|
|
321
321
|
return "void"
|
|
@@ -408,7 +408,7 @@ def baremethod(
|
|
|
408
408
|
@functools.wraps(fn)
|
|
409
409
|
def wrapper(*args: _P.args, **kwargs: _P.kwargs) -> _R:
|
|
410
410
|
contract, *app_args = args
|
|
411
|
-
assert isinstance(contract,
|
|
411
|
+
assert isinstance(contract, _algopy_testing.ARC4Contract), "expected ARC4 contract"
|
|
412
412
|
assert fn is not None, "expected function"
|
|
413
413
|
|
|
414
414
|
txns = create_baremethod_txns(contract.__app_id__)
|