algorand-python-testing 0.6.0b1__tar.gz → 0.6.0b2__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.6.0b1 → algorand_python_testing-0.6.0b2}/CHANGELOG.md +6 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/PKG-INFO +1 -1
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/pyproject.toml +1 -1
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/state/box.py +41 -1
- algorand_python_testing-0.6.0b2/src/_algopy_testing/utilities/size_of.py +9 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/utils.py +20 -2
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/models/test_box.py +139 -0
- algorand_python_testing-0.6.0b1/src/_algopy_testing/utilities/size_of.py +0 -22
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/.coveragerc +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/.editorconfig +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/.github/dependabot.yml +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/.github/pull_request_template.md +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/.github/workflows/cd.yaml +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/.github/workflows/ci.yaml +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/.github/workflows/gh-pages.yaml +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/.gitignore +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/.pre-commit-config.yaml +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/.vscode/extensions.json +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/.vscode/launch.json +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/.vscode/settings.json +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/CONTRIBUTING.md +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/LICENSE +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/README.md +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/docs/Makefile +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/docs/__init__.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/docs/_static/custom.css +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/docs/algopy.md +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/docs/api.md +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/docs/conf.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/docs/coverage.md +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/docs/examples.md +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/docs/faq.md +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/docs/index.md +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/docs/make.bat +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/docs/testing-guide/arc4-types.md +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/docs/testing-guide/avm-types.md +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/docs/testing-guide/concepts.md +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/docs/testing-guide/contract-testing.md +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/docs/testing-guide/index.md +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/docs/testing-guide/opcodes.md +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/docs/testing-guide/signature-testing.md +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/docs/testing-guide/state-management.md +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/docs/testing-guide/subroutines.md +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/docs/testing-guide/transactions.md +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/examples/README.md +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/examples/__init__.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/examples/auction/__init__.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/examples/auction/contract.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/examples/auction/test_contract.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/examples/htlc_logicsig/__init__.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/examples/htlc_logicsig/signature.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/examples/htlc_logicsig/test_signature.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/examples/marketplace/__init__.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/examples/marketplace/contract.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/examples/marketplace/test_contract.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/examples/proof_of_attendance/__init__.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/examples/proof_of_attendance/contract.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/examples/proof_of_attendance/test_contract.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/examples/scratch_storage/__init__.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/examples/scratch_storage/contract.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/examples/scratch_storage/test_contract.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/examples/simple_voting/__init__.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/examples/simple_voting/contract.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/examples/simple_voting/test_contract.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/examples/zk_whitelist/__init__.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/examples/zk_whitelist/contract.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/examples/zk_whitelist/test_contract.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/scripts/__init__.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/scripts/check_stubs_cov.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/scripts/refresh_test_artifacts.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/scripts/validate_examples.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/__init__.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/arc4.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/compiled.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/constants.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/context.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/context_helpers/__init__.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/context_helpers/context_storage.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/context_helpers/ledger_context.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/context_helpers/txn_context.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/decorators/__init__.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/decorators/arc4.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/decorators/subroutine.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/enums.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/gtxn.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/itxn.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/itxn_loader.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/models/__init__.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/models/account.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/models/application.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/models/asset.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/models/contract.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/models/logicsig.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/models/template_variable.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/models/txn_fields.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/models/unsigned_builtins.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/mutable.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/op/__init__.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/op/block.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/op/constants.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/op/crypto.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/op/global_values.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/op/itxn.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/op/misc.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/op/pure.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/op/txn.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/primitives/__init__.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/primitives/array.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/primitives/biguint.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/primitives/bytes.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/primitives/string.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/primitives/uint64.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/protocols.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/py.typed +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/serialize.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/state/__init__.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/state/global_state.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/state/local_state.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/state/utils.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/utilities/__init__.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/utilities/budget.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/utilities/log.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/value_generators/__init__.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/value_generators/arc4.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/value_generators/avm.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/value_generators/txn.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/algopy/__init__.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/algopy/arc4.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/algopy/gtxn.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/algopy/itxn.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/algopy/op.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/algopy/py.typed +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/algopy_testing/__init__.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/algopy_testing/py.typed +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/templates/.macros.j2 +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/templates/.release_notes.md.j2 +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/templates/CHANGELOG.md.j2 +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/__init__.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/arc4/__init__.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/arc4/conftest.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/arc4/test_abi_call.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/arc4/test_address.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/arc4/test_arc4_method_signature.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/arc4/test_bool.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/arc4/test_dynamic_array.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/arc4/test_dynamic_bytes.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/arc4/test_emit.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/arc4/test_static_array.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/arc4/test_string.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/arc4/test_struct.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/arc4/test_tuple.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/arc4/test_ufixednxm.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/arc4/test_uintn.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/Arc4ABIMethod/__init__.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/Arc4ABIMethod/contract.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/Arc4ABIMethod/data/SignaturesContract.approval.teal +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/Arc4ABIMethod/data/SignaturesContract.arc32.json +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/Arc4ABIMethod/data/SignaturesContract.clear.teal +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/Arc4InnerTxns/__init__.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/Arc4InnerTxns/contract.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/Arc4InnerTxns/data/Arc4InnerTxnsContract.approval.teal +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/Arc4InnerTxns/data/Arc4InnerTxnsContract.arc32.json +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/Arc4InnerTxns/data/Arc4InnerTxnsContract.clear.teal +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/Arc4PrimitiveOps/__init__.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/Arc4PrimitiveOps/contract.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/Arc4PrimitiveOps/data/Arc4PrimitiveOpsContract.approval.teal +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/Arc4PrimitiveOps/data/Arc4PrimitiveOpsContract.arc32.json +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/Arc4PrimitiveOps/data/Arc4PrimitiveOpsContract.clear.teal +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/Arrays/__init__.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/Arrays/data/Contract.approval.teal +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/Arrays/data/Contract.arc32.json +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/Arrays/data/Contract.clear.teal +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/Arrays/data/ImmutableArrayContract.approval.teal +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/Arrays/data/ImmutableArrayContract.arc32.json +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/Arrays/data/ImmutableArrayContract.clear.teal +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/Arrays/data/StaticSizeContract.approval.teal +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/Arrays/data/StaticSizeContract.arc32.json +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/Arrays/data/StaticSizeContract.clear.teal +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/Arrays/immutable.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/Arrays/static_size.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/Arrays/uint64.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/BoxContract/__init__.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/BoxContract/contract.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/BoxContract/data/BoxContract.approval.teal +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/BoxContract/data/BoxContract.arc32.json +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/BoxContract/data/BoxContract.clear.teal +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/Contains/__init__.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/Contains/contract.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/Contains/data/MyContract.approval.teal +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/Contains/data/MyContract.clear.teal +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/CreatedAppAsset/__init__.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/CreatedAppAsset/contract.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/CreatedAppAsset/data/AppCall.approval.teal +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/CreatedAppAsset/data/AppCall.arc32.json +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/CreatedAppAsset/data/AppCall.clear.teal +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/CreatedAppAsset/data/AppExpectingEffects.approval.teal +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/CreatedAppAsset/data/AppExpectingEffects.arc32.json +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/CreatedAppAsset/data/AppExpectingEffects.clear.teal +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/CreatedAppAsset/other.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/CryptoOps/__init__.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/CryptoOps/contract.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/CryptoOps/data/CryptoOpsContract.approval.teal +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/CryptoOps/data/CryptoOpsContract.arc32.json +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/CryptoOps/data/CryptoOpsContract.clear.teal +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/GlobalStateValidator/__init__.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/GlobalStateValidator/contract.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/GlobalStateValidator/data/GlobalStateValidator.approval.teal +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/GlobalStateValidator/data/GlobalStateValidator.arc32.json +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/GlobalStateValidator/data/GlobalStateValidator.clear.teal +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/MiscellaneousOps/__init__.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/MiscellaneousOps/contract.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/MiscellaneousOps/data/MiscellaneousOpsContract.approval.teal +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/MiscellaneousOps/data/MiscellaneousOpsContract.arc32.json +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/MiscellaneousOps/data/MiscellaneousOpsContract.clear.teal +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/PrimitiveOps/__init__.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/PrimitiveOps/contract.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/PrimitiveOps/data/PrimitiveOpsContract.approval.teal +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/PrimitiveOps/data/PrimitiveOpsContract.arc32.json +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/PrimitiveOps/data/PrimitiveOpsContract.clear.teal +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/StateMutations/__init__.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/StateMutations/data/Contract.approval.teal +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/StateMutations/data/Contract.arc32.json +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/StateMutations/data/Contract.clear.teal +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/StateMutations/data/StateMutations.approval.teal +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/StateMutations/data/StateMutations.arc32.json +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/StateMutations/data/StateMutations.clear.teal +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/StateMutations/statemutations.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/StateOps/__init__.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/StateOps/contract.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/StateOps/data/GlobalStateContract.approval.teal +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/StateOps/data/GlobalStateContract.arc32.json +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/StateOps/data/GlobalStateContract.clear.teal +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/StateOps/data/ITxnOpsContract.approval.teal +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/StateOps/data/ITxnOpsContract.arc32.json +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/StateOps/data/ITxnOpsContract.clear.teal +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/StateOps/data/LocalStateContract.approval.teal +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/StateOps/data/LocalStateContract.arc32.json +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/StateOps/data/LocalStateContract.clear.teal +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/StateOps/data/StateAcctParamsGet.approval.teal +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/StateOps/data/StateAcctParamsGet.arc32.json +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/StateOps/data/StateAcctParamsGet.clear.teal +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/StateOps/data/StateAcctParamsGetContract.approval.teal +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/StateOps/data/StateAcctParamsGetContract.arc32.json +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/StateOps/data/StateAcctParamsGetContract.clear.teal +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/StateOps/data/StateAppGlobalContract.approval.teal +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/StateOps/data/StateAppGlobalContract.arc32.json +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/StateOps/data/StateAppGlobalContract.clear.teal +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/StateOps/data/StateAppGlobalExContract.approval.teal +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/StateOps/data/StateAppGlobalExContract.arc32.json +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/StateOps/data/StateAppGlobalExContract.clear.teal +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/StateOps/data/StateAppLocalContract.approval.teal +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/StateOps/data/StateAppLocalContract.arc32.json +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/StateOps/data/StateAppLocalContract.clear.teal +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/StateOps/data/StateAppLocalExContract.approval.teal +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/StateOps/data/StateAppLocalExContract.arc32.json +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/StateOps/data/StateAppLocalExContract.clear.teal +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/StateOps/data/StateAppParamsContract.approval.teal +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/StateOps/data/StateAppParamsContract.arc32.json +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/StateOps/data/StateAppParamsContract.clear.teal +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/StateOps/data/StateAssetHoldingContract.approval.teal +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/StateOps/data/StateAssetHoldingContract.arc32.json +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/StateOps/data/StateAssetHoldingContract.clear.teal +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/StateOps/data/StateAssetParamsContract.approval.teal +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/StateOps/data/StateAssetParamsContract.arc32.json +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/StateOps/data/StateAssetParamsContract.clear.teal +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/artifacts/__init__.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/common.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/conftest.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/contexts/__init__.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/models/__init__.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/models/test_asset.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/models/test_box_map.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/models/test_box_ref.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/models/test_contract.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/models/test_uenumerate.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/models/test_urange.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/primitives/__init__.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/primitives/conftest.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/primitives/test_biguint.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/primitives/test_bytes.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/primitives/test_string.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/primitives/test_uint64.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/state/__init__.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/state/conftest.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/state/test_global_state.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/state/test_local_state.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/state/test_mutations.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/test_array.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/test_context.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/test_miscellaneous_op.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/test_op.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/util.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/utilities/__init__.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/utilities/conftest.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/utilities/test_log.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/utilities/test_size_of.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/value_generators/__init__.py +0 -0
- {algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/value_generators/test_avm.py +0 -0
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
# CHANGELOG
|
|
2
|
+
## v0.6.0-beta.2 (2025-05-15)
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* add stubs for box create function ([`1fe6fe5`](https://github.com/algorandfoundation/algorand-python-testing/commit/1fe6fe55358630a6abea2f69406821cb6031a4d5))
|
|
7
|
+
|
|
2
8
|
## v0.6.0-beta.1 (2025-05-09)
|
|
3
9
|
|
|
4
10
|
### Features
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: algorand-python-testing
|
|
3
|
-
Version: 0.6.
|
|
3
|
+
Version: 0.6.0b2
|
|
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
|
{algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/state/box.py
RENAMED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
3
|
import typing
|
|
4
|
+
import warnings
|
|
4
5
|
|
|
5
6
|
import _algopy_testing
|
|
6
7
|
from _algopy_testing.constants import MAX_BOX_SIZE
|
|
7
8
|
from _algopy_testing.context_helpers import lazy_context
|
|
8
9
|
from _algopy_testing.mutable import set_attr_on_mutate, set_item_on_mutate
|
|
9
10
|
from _algopy_testing.state.utils import cast_from_bytes, cast_to_bytes
|
|
10
|
-
from _algopy_testing.utils import as_bytes, as_string
|
|
11
|
+
from _algopy_testing.utils import as_bytes, as_int64, as_string, get_static_size_of
|
|
11
12
|
|
|
12
13
|
_TKey = typing.TypeVar("_TKey")
|
|
13
14
|
_TValue = typing.TypeVar("_TValue")
|
|
@@ -38,6 +39,45 @@ class Box(typing.Generic[_TValue]):
|
|
|
38
39
|
def __bool__(self) -> bool:
|
|
39
40
|
return lazy_context.ledger.box_exists(self.app_id, self.key)
|
|
40
41
|
|
|
42
|
+
def create(self, *, size: algopy.UInt64 | int | None = None) -> bool:
|
|
43
|
+
missing_size_err_msg = (
|
|
44
|
+
f"{self._type} does not have a fixed byte size. Please specify a size argument"
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
size_arg = None if size is None else as_int64(size)
|
|
48
|
+
content_type_size = get_static_size_of(self._type)
|
|
49
|
+
|
|
50
|
+
if content_type_size is None and size_arg is None:
|
|
51
|
+
raise ValueError(missing_size_err_msg)
|
|
52
|
+
if content_type_size is not None and size_arg is not None:
|
|
53
|
+
if size_arg < content_type_size:
|
|
54
|
+
warnings.warn(
|
|
55
|
+
f"Box size should not be less than {content_type_size}",
|
|
56
|
+
stacklevel=2,
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
if size_arg > content_type_size:
|
|
60
|
+
warnings.warn(
|
|
61
|
+
f"Size is set to {size_arg} but {self._type} has a fixed size of {content_type_size}", # noqa: E501
|
|
62
|
+
stacklevel=2,
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
size_int = size_arg if size_arg is not None else content_type_size
|
|
66
|
+
assert size_int is not None, missing_size_err_msg
|
|
67
|
+
|
|
68
|
+
if size_int > MAX_BOX_SIZE:
|
|
69
|
+
raise ValueError(f"Box size cannot exceed {MAX_BOX_SIZE}")
|
|
70
|
+
|
|
71
|
+
box_exists = lazy_context.ledger.box_exists(self.app_id, self.key)
|
|
72
|
+
if box_exists:
|
|
73
|
+
if self.length == size_int:
|
|
74
|
+
return False
|
|
75
|
+
else:
|
|
76
|
+
raise ValueError(f"Box already exists with a different size: {self.length}")
|
|
77
|
+
|
|
78
|
+
lazy_context.ledger.set_box(self.app_id, self.key, b"\x00" * size_int)
|
|
79
|
+
return True
|
|
80
|
+
|
|
41
81
|
@property
|
|
42
82
|
def key(self) -> algopy.Bytes:
|
|
43
83
|
if not self._key:
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
from _algopy_testing.primitives.uint64 import UInt64
|
|
2
|
+
from _algopy_testing.utils import get_static_size_of
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
def size_of(typ: type | object, /) -> UInt64:
|
|
6
|
+
size = get_static_size_of(typ)
|
|
7
|
+
if size is None:
|
|
8
|
+
raise ValueError(f"{typ} is dynamically sized")
|
|
9
|
+
return UInt64(size)
|
{algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/utils.py
RENAMED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
3
|
import secrets
|
|
4
|
+
import types
|
|
4
5
|
import typing
|
|
5
6
|
from typing import TYPE_CHECKING
|
|
6
7
|
|
|
@@ -22,8 +23,6 @@ from _algopy_testing.constants import (
|
|
|
22
23
|
)
|
|
23
24
|
|
|
24
25
|
if TYPE_CHECKING:
|
|
25
|
-
import types
|
|
26
|
-
|
|
27
26
|
import algopy
|
|
28
27
|
|
|
29
28
|
from _algopy_testing.op.global_values import GlobalFields
|
|
@@ -195,3 +194,22 @@ def raise_mocked_function_error(func_name: str) -> typing.Never:
|
|
|
195
194
|
f"{func_name!r} is not available in test context. "
|
|
196
195
|
"Mock using your preferred testing framework."
|
|
197
196
|
)
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
def get_static_size_of(typ: type | object, /) -> int | None:
|
|
200
|
+
from _algopy_testing import UInt64
|
|
201
|
+
from _algopy_testing.arc4 import get_max_bytes_static_len
|
|
202
|
+
from _algopy_testing.serialize import get_native_to_arc4_serializer
|
|
203
|
+
|
|
204
|
+
if isinstance(typ, types.GenericAlias):
|
|
205
|
+
pass
|
|
206
|
+
elif not isinstance(typ, type):
|
|
207
|
+
typ = type(typ)
|
|
208
|
+
|
|
209
|
+
if typ is bool: # treat bool on its own as a uint64
|
|
210
|
+
typ = UInt64
|
|
211
|
+
serializer = get_native_to_arc4_serializer(typ) # type: ignore[arg-type]
|
|
212
|
+
type_info = serializer.arc4_type._type_info
|
|
213
|
+
size = get_max_bytes_static_len(type_info)
|
|
214
|
+
|
|
215
|
+
return size
|
{algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/tests/models/test_box.py
RENAMED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import re
|
|
1
2
|
import typing
|
|
2
3
|
from collections.abc import Generator
|
|
3
4
|
|
|
@@ -5,12 +6,16 @@ import algopy
|
|
|
5
6
|
import pytest
|
|
6
7
|
from _algopy_testing import algopy_testing_context, arc4
|
|
7
8
|
from _algopy_testing.context import AlgopyTestContext
|
|
9
|
+
from _algopy_testing.models.account import Account
|
|
10
|
+
from _algopy_testing.models.application import Application
|
|
11
|
+
from _algopy_testing.models.asset import Asset
|
|
8
12
|
from _algopy_testing.op.pure import itob
|
|
9
13
|
from _algopy_testing.primitives.biguint import BigUInt
|
|
10
14
|
from _algopy_testing.primitives.bytes import Bytes
|
|
11
15
|
from _algopy_testing.primitives.string import String
|
|
12
16
|
from _algopy_testing.primitives.uint64 import UInt64
|
|
13
17
|
from _algopy_testing.state.box import Box
|
|
18
|
+
from _algopy_testing.state.utils import cast_to_bytes
|
|
14
19
|
from _algopy_testing.utils import as_bytes, as_string
|
|
15
20
|
|
|
16
21
|
from tests.artifacts.BoxContract.contract import BoxContract
|
|
@@ -18,6 +23,20 @@ from tests.artifacts.BoxContract.contract import BoxContract
|
|
|
18
23
|
BOX_NOT_CREATED_ERROR = "Box has not been created"
|
|
19
24
|
|
|
20
25
|
|
|
26
|
+
class Swapped(arc4.Struct):
|
|
27
|
+
b: arc4.UInt64
|
|
28
|
+
c: arc4.Bool
|
|
29
|
+
d: arc4.Address
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
# TODO: add tests for tuple and namedtuple once they are supported
|
|
33
|
+
# class MyStruct(typing.NamedTuple):
|
|
34
|
+
# a: UInt64
|
|
35
|
+
# b: bool
|
|
36
|
+
# c: arc4.Bool
|
|
37
|
+
# d: arc4.UInt64
|
|
38
|
+
|
|
39
|
+
|
|
21
40
|
class ATestContract(algopy.Contract):
|
|
22
41
|
def __init__(self) -> None:
|
|
23
42
|
self.uint_64_box = algopy.Box(algopy.UInt64)
|
|
@@ -68,6 +87,126 @@ def test_init_with_key(
|
|
|
68
87
|
_ = box.length
|
|
69
88
|
|
|
70
89
|
|
|
90
|
+
@pytest.mark.parametrize(
|
|
91
|
+
("value_type", "expected_size"),
|
|
92
|
+
[
|
|
93
|
+
(arc4.UInt64, 8),
|
|
94
|
+
(UInt64, 8),
|
|
95
|
+
(arc4.Address, 32),
|
|
96
|
+
(Account, 32),
|
|
97
|
+
(Application, 8),
|
|
98
|
+
(Asset, 8),
|
|
99
|
+
(bool, 8),
|
|
100
|
+
(arc4.StaticArray[arc4.Byte, typing.Literal[7]], 7),
|
|
101
|
+
(Swapped, 41),
|
|
102
|
+
# TODO: add tests for tuple and namedtuple once they are supported
|
|
103
|
+
# (tuple[arc4.UInt64, arc4.Bool, arc4.Address], 41),
|
|
104
|
+
# (MyStruct, 9),
|
|
105
|
+
],
|
|
106
|
+
)
|
|
107
|
+
def test_create_for_static_value_type(
|
|
108
|
+
context: AlgopyTestContext, # noqa: ARG001
|
|
109
|
+
value_type: type,
|
|
110
|
+
expected_size: int,
|
|
111
|
+
) -> None:
|
|
112
|
+
key = b"test_key"
|
|
113
|
+
box = Box(value_type, key=key) # type: ignore[var-annotated]
|
|
114
|
+
assert not box
|
|
115
|
+
|
|
116
|
+
box.create()
|
|
117
|
+
assert box
|
|
118
|
+
|
|
119
|
+
op_box_content, op_box_exists = algopy.op.Box.get(key)
|
|
120
|
+
assert op_box_exists
|
|
121
|
+
assert op_box_content == b"\x00" * expected_size
|
|
122
|
+
|
|
123
|
+
box_content, box_exists = box.maybe()
|
|
124
|
+
assert box_exists
|
|
125
|
+
assert cast_to_bytes(box_content) == b"\x00" * expected_size
|
|
126
|
+
|
|
127
|
+
assert box.length == expected_size
|
|
128
|
+
|
|
129
|
+
|
|
130
|
+
@pytest.mark.parametrize(
|
|
131
|
+
("value_type", "size", "expected_size"),
|
|
132
|
+
[
|
|
133
|
+
(arc4.UInt64, 7, 8),
|
|
134
|
+
(UInt64, 0, 8),
|
|
135
|
+
(arc4.Address, 16, 32),
|
|
136
|
+
(Account, 31, 32),
|
|
137
|
+
(Application, 1, 8),
|
|
138
|
+
(Asset, 0, 8),
|
|
139
|
+
(bool, 1, 8),
|
|
140
|
+
(arc4.StaticArray[arc4.Byte, typing.Literal[7]], 2, 7),
|
|
141
|
+
],
|
|
142
|
+
)
|
|
143
|
+
def test_create_smaller_box_for_static_value_type(
|
|
144
|
+
context: AlgopyTestContext, # noqa: ARG001
|
|
145
|
+
value_type: type,
|
|
146
|
+
size: int,
|
|
147
|
+
expected_size: int,
|
|
148
|
+
) -> None:
|
|
149
|
+
key = b"test_key"
|
|
150
|
+
box = Box(value_type, key=key) # type: ignore[var-annotated]
|
|
151
|
+
assert not box
|
|
152
|
+
|
|
153
|
+
with pytest.warns(UserWarning, match=f"Box size should not be less than {expected_size}"):
|
|
154
|
+
box.create(size=size)
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
@pytest.mark.parametrize(
|
|
158
|
+
("value_type", "size"),
|
|
159
|
+
[
|
|
160
|
+
(arc4.String, 7),
|
|
161
|
+
(arc4.DynamicArray[arc4.UInt64], 0),
|
|
162
|
+
(arc4.DynamicArray[arc4.Address], 16),
|
|
163
|
+
(Bytes, 31),
|
|
164
|
+
(arc4.StaticArray[arc4.String, typing.Literal[7]], 2),
|
|
165
|
+
],
|
|
166
|
+
)
|
|
167
|
+
def test_create_box_for_dynamic_value_type(
|
|
168
|
+
context: AlgopyTestContext, # noqa: ARG001
|
|
169
|
+
value_type: type,
|
|
170
|
+
size: int,
|
|
171
|
+
) -> None:
|
|
172
|
+
key = b"test_key"
|
|
173
|
+
box = Box(value_type, key=key) # type: ignore[var-annotated]
|
|
174
|
+
assert not box
|
|
175
|
+
|
|
176
|
+
box.create(size=size)
|
|
177
|
+
|
|
178
|
+
op_box_content, op_box_exists = algopy.op.Box.get(key)
|
|
179
|
+
assert op_box_exists
|
|
180
|
+
assert op_box_content == b"\x00" * size
|
|
181
|
+
|
|
182
|
+
assert box.length == size
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
@pytest.mark.parametrize(
|
|
186
|
+
"value_type",
|
|
187
|
+
[
|
|
188
|
+
arc4.String,
|
|
189
|
+
arc4.DynamicArray[arc4.UInt64],
|
|
190
|
+
arc4.DynamicArray[arc4.Address],
|
|
191
|
+
Bytes,
|
|
192
|
+
arc4.StaticArray[arc4.String, typing.Literal[7]],
|
|
193
|
+
],
|
|
194
|
+
)
|
|
195
|
+
def test_create_box_for_dynamic_value_type_with_no_size(
|
|
196
|
+
context: AlgopyTestContext, # noqa: ARG001
|
|
197
|
+
value_type: type,
|
|
198
|
+
) -> None:
|
|
199
|
+
key = b"test_key"
|
|
200
|
+
box = Box(value_type, key=key) # type: ignore[var-annotated]
|
|
201
|
+
assert not box
|
|
202
|
+
|
|
203
|
+
with pytest.raises(
|
|
204
|
+
ValueError,
|
|
205
|
+
match=re.compile("does not have a fixed byte size. Please specify a size argument"),
|
|
206
|
+
):
|
|
207
|
+
box.create()
|
|
208
|
+
|
|
209
|
+
|
|
71
210
|
@pytest.mark.parametrize(
|
|
72
211
|
("value_type", "value"),
|
|
73
212
|
[
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import types
|
|
2
|
-
|
|
3
|
-
from _algopy_testing.primitives.uint64 import UInt64
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
def size_of(typ: type | object, /) -> UInt64:
|
|
7
|
-
from _algopy_testing.arc4 import get_max_bytes_static_len
|
|
8
|
-
from _algopy_testing.serialize import get_native_to_arc4_serializer
|
|
9
|
-
|
|
10
|
-
if isinstance(typ, types.GenericAlias):
|
|
11
|
-
pass
|
|
12
|
-
elif not isinstance(typ, type):
|
|
13
|
-
typ = type(typ)
|
|
14
|
-
|
|
15
|
-
if typ is bool: # treat bool on its own as a uint64
|
|
16
|
-
typ = UInt64
|
|
17
|
-
serializer = get_native_to_arc4_serializer(typ) # type: ignore[arg-type]
|
|
18
|
-
type_info = serializer.arc4_type._type_info
|
|
19
|
-
size = get_max_bytes_static_len(type_info)
|
|
20
|
-
if size is None:
|
|
21
|
-
raise ValueError(f"{typ} is dynamically sized")
|
|
22
|
-
return UInt64(size)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/.github/pull_request_template.md
RENAMED
|
File without changes
|
{algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/.github/workflows/cd.yaml
RENAMED
|
File without changes
|
{algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/.github/workflows/ci.yaml
RENAMED
|
File without changes
|
{algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/.github/workflows/gh-pages.yaml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/docs/testing-guide/arc4-types.md
RENAMED
|
File without changes
|
{algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/docs/testing-guide/avm-types.md
RENAMED
|
File without changes
|
{algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/docs/testing-guide/concepts.md
RENAMED
|
File without changes
|
|
File without changes
|
{algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/docs/testing-guide/index.md
RENAMED
|
File without changes
|
{algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/docs/testing-guide/opcodes.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/examples/auction/__init__.py
RENAMED
|
File without changes
|
{algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/examples/auction/contract.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/examples/marketplace/__init__.py
RENAMED
|
File without changes
|
{algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/examples/marketplace/contract.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/scripts/check_stubs_cov.py
RENAMED
|
File without changes
|
|
File without changes
|
{algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/scripts/validate_examples.py
RENAMED
|
File without changes
|
{algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/__init__.py
RENAMED
|
File without changes
|
{algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/arc4.py
RENAMED
|
File without changes
|
{algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/compiled.py
RENAMED
|
File without changes
|
{algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/constants.py
RENAMED
|
File without changes
|
{algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/context.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/enums.py
RENAMED
|
File without changes
|
{algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/gtxn.py
RENAMED
|
File without changes
|
{algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/itxn.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/mutable.py
RENAMED
|
File without changes
|
|
File without changes
|
{algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/op/block.py
RENAMED
|
File without changes
|
|
File without changes
|
{algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/op/crypto.py
RENAMED
|
File without changes
|
|
File without changes
|
{algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/op/itxn.py
RENAMED
|
File without changes
|
{algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/op/misc.py
RENAMED
|
File without changes
|
{algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/op/pure.py
RENAMED
|
File without changes
|
{algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/op/txn.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/protocols.py
RENAMED
|
File without changes
|
{algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/py.typed
RENAMED
|
File without changes
|
{algorand_python_testing-0.6.0b1 → algorand_python_testing-0.6.0b2}/src/_algopy_testing/serialize.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|