algorand-python-testing 0.3.0b7__tar.gz → 0.3.0b9__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.
Files changed (266) hide show
  1. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/CHANGELOG.md +8 -0
  2. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/PKG-INFO +1 -1
  3. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/docs/testing-guide/arc4-types.md +0 -1
  4. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/docs/testing-guide/avm-types.md +0 -1
  5. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/docs/testing-guide/opcodes.md +23 -28
  6. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/docs/testing-guide/signature-testing.md +0 -1
  7. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/docs/testing-guide/state-management.md +0 -1
  8. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/docs/testing-guide/transactions.md +2 -2
  9. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/pyproject.toml +9 -10
  10. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/__init__.py +7 -7
  11. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/arc4.py +14 -31
  12. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/context.py +2 -2
  13. algorand_python_testing-0.3.0b9/src/_algopy_testing/context_helpers/__init__.py +13 -0
  14. {algorand_python_testing-0.3.0b7/src/_algopy_testing/_context_helpers → algorand_python_testing-0.3.0b9/src/_algopy_testing/context_helpers}/context_storage.py +6 -6
  15. {algorand_python_testing-0.3.0b7/src/_algopy_testing/_context_helpers → algorand_python_testing-0.3.0b9/src/_algopy_testing/context_helpers}/ledger_context.py +21 -21
  16. {algorand_python_testing-0.3.0b7/src/_algopy_testing/_context_helpers → algorand_python_testing-0.3.0b9/src/_algopy_testing/context_helpers}/txn_context.py +37 -27
  17. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/decorators/arc4.py +45 -41
  18. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/gtxn.py +1 -1
  19. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/itxn.py +1 -1
  20. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/models/account.py +2 -2
  21. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/models/application.py +9 -17
  22. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/models/asset.py +12 -31
  23. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/models/contract.py +22 -23
  24. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/models/template_variable.py +1 -1
  25. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/models/txn_fields.py +1 -1
  26. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/op/block.py +1 -1
  27. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/op/crypto.py +1 -1
  28. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/op/global_values.py +3 -5
  29. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/op/itxn.py +1 -1
  30. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/op/misc.py +8 -10
  31. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/op/txn.py +1 -1
  32. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/state/box.py +2 -2
  33. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/state/global_state.py +2 -2
  34. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/state/local_state.py +2 -2
  35. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/state/utils.py +2 -3
  36. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/utilities/log.py +1 -1
  37. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/utils.py +22 -0
  38. {algorand_python_testing-0.3.0b7/src/_algopy_testing/_value_generators → algorand_python_testing-0.3.0b9/src/_algopy_testing/value_generators}/avm.py +8 -8
  39. {algorand_python_testing-0.3.0b7/src/_algopy_testing/_value_generators → algorand_python_testing-0.3.0b9/src/_algopy_testing/value_generators}/txn.py +1 -1
  40. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/algopy/__init__.py +1 -1
  41. algorand_python_testing-0.3.0b9/src/algopy_testing/__init__.py +25 -0
  42. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/models/test_asset.py +1 -3
  43. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/models/test_box.py +18 -18
  44. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/models/test_box_map.py +4 -5
  45. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/models/test_box_ref.py +4 -5
  46. algorand_python_testing-0.3.0b9/tests/models/test_contract.py +108 -0
  47. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/state/test_global_state.py +1 -1
  48. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/state/test_local_state.py +1 -1
  49. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/test_context.py +9 -9
  50. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/test_op.py +40 -45
  51. algorand_python_testing-0.3.0b7/src/_algopy_testing/_context_helpers/__init__.py +0 -13
  52. algorand_python_testing-0.3.0b7/src/algopy_testing/__init__.py +0 -25
  53. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/.coveragerc +0 -0
  54. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/.editorconfig +0 -0
  55. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  56. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  57. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/.github/pull_request_template.md +0 -0
  58. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/.github/workflows/cd.yaml +0 -0
  59. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/.github/workflows/ci.yaml +0 -0
  60. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/.github/workflows/gh-pages.yaml +0 -0
  61. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/.gitignore +0 -0
  62. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/.pre-commit-config.yaml +0 -0
  63. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/.vscode/extensions.json +0 -0
  64. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/.vscode/launch.json +0 -0
  65. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/.vscode/settings.json +0 -0
  66. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/CONTRIBUTING.md +0 -0
  67. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/LICENSE +0 -0
  68. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/README.md +0 -0
  69. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/docs/Makefile +0 -0
  70. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/docs/__init__.py +0 -0
  71. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/docs/_static/custom.css +0 -0
  72. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/docs/algopy.md +0 -0
  73. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/docs/api.md +0 -0
  74. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/docs/conf.py +0 -0
  75. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/docs/coverage.md +0 -0
  76. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/docs/examples.md +0 -0
  77. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/docs/glossary.md +0 -0
  78. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/docs/index.md +0 -0
  79. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/docs/make.bat +0 -0
  80. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/docs/testing-guide/concepts.md +0 -0
  81. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/docs/testing-guide/contract-testing.md +0 -0
  82. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/docs/testing-guide/index.md +0 -0
  83. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/docs/testing-guide/subroutines.md +0 -0
  84. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/examples/README.md +0 -0
  85. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/examples/__init__.py +0 -0
  86. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/examples/auction/__init__.py +0 -0
  87. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/examples/auction/contract.py +0 -0
  88. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/examples/auction/test_contract.py +0 -0
  89. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/examples/htlc_logicsig/__init__.py +0 -0
  90. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/examples/htlc_logicsig/signature.py +0 -0
  91. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/examples/htlc_logicsig/test_signature.py +0 -0
  92. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/examples/marketplace/__init__.py +0 -0
  93. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/examples/marketplace/contract.py +0 -0
  94. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/examples/marketplace/test_contract.py +0 -0
  95. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/examples/proof_of_attendance/__init__.py +0 -0
  96. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/examples/proof_of_attendance/contract.py +0 -0
  97. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/examples/proof_of_attendance/test_contract.py +0 -0
  98. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/examples/scratch_storage/__init__.py +0 -0
  99. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/examples/scratch_storage/contract.py +0 -0
  100. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/examples/scratch_storage/test_contract.py +0 -0
  101. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/examples/simple_voting/__init__.py +0 -0
  102. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/examples/simple_voting/contract.py +0 -0
  103. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/examples/simple_voting/test_contract.py +0 -0
  104. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/examples/zk_whitelist/__init__.py +0 -0
  105. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/examples/zk_whitelist/contract.py +0 -0
  106. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/examples/zk_whitelist/test_contract.py +0 -0
  107. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/scripts/__init__.py +0 -0
  108. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/scripts/check_stubs_cov.py +0 -0
  109. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/scripts/refresh_test_artifacts.py +0 -0
  110. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/scripts/validate_examples.py +0 -0
  111. /algorand_python_testing-0.3.0b7/src/_algopy_testing/_compiled.py → /algorand_python_testing-0.3.0b9/src/_algopy_testing/compiled.py +0 -0
  112. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/constants.py +0 -0
  113. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/decorators/__init__.py +0 -0
  114. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/decorators/subroutine.py +0 -0
  115. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/enums.py +0 -0
  116. /algorand_python_testing-0.3.0b7/src/_algopy_testing/_itxn_loader.py → /algorand_python_testing-0.3.0b9/src/_algopy_testing/itxn_loader.py +0 -0
  117. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/models/__init__.py +0 -0
  118. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/models/logicsig.py +0 -0
  119. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/models/unsigned_builtins.py +0 -0
  120. /algorand_python_testing-0.3.0b7/src/_algopy_testing/_mutable.py → /algorand_python_testing-0.3.0b9/src/_algopy_testing/mutable.py +0 -0
  121. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/op/__init__.py +0 -0
  122. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/op/constants.py +0 -0
  123. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/op/pure.py +0 -0
  124. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/primitives/__init__.py +0 -0
  125. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/primitives/biguint.py +0 -0
  126. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/primitives/bytes.py +0 -0
  127. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/primitives/string.py +0 -0
  128. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/primitives/uint64.py +0 -0
  129. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/protocols.py +0 -0
  130. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/py.typed +0 -0
  131. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/state/__init__.py +0 -0
  132. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/utilities/__init__.py +0 -0
  133. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/_algopy_testing/utilities/budget.py +0 -0
  134. {algorand_python_testing-0.3.0b7/src/_algopy_testing/_value_generators → algorand_python_testing-0.3.0b9/src/_algopy_testing/value_generators}/__init__.py +0 -0
  135. {algorand_python_testing-0.3.0b7/src/_algopy_testing/_value_generators → algorand_python_testing-0.3.0b9/src/_algopy_testing/value_generators}/arc4.py +0 -0
  136. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/algopy/arc4.py +0 -0
  137. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/algopy/gtxn.py +0 -0
  138. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/algopy/itxn.py +0 -0
  139. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/algopy/op.py +0 -0
  140. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/algopy/py.typed +0 -0
  141. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/src/algopy_testing/py.typed +0 -0
  142. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/templates/.macros.j2 +0 -0
  143. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/templates/.release_notes.md.j2 +0 -0
  144. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/templates/CHANGELOG.md.j2 +0 -0
  145. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/__init__.py +0 -0
  146. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/arc4/__init__.py +0 -0
  147. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/arc4/conftest.py +0 -0
  148. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/arc4/test_abi_call.py +0 -0
  149. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/arc4/test_address.py +0 -0
  150. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/arc4/test_arc4_method_signature.py +0 -0
  151. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/arc4/test_bool.py +0 -0
  152. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/arc4/test_dynamic_array.py +0 -0
  153. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/arc4/test_dynamic_bytes.py +0 -0
  154. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/arc4/test_emit.py +0 -0
  155. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/arc4/test_static_array.py +0 -0
  156. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/arc4/test_string.py +0 -0
  157. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/arc4/test_struct.py +0 -0
  158. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/arc4/test_tuple.py +0 -0
  159. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/arc4/test_ufixednxm.py +0 -0
  160. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/arc4/test_uintn.py +0 -0
  161. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/Arc4ABIMethod/__init__.py +0 -0
  162. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/Arc4ABIMethod/contract.py +0 -0
  163. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/Arc4ABIMethod/data/SignaturesContract.approval.teal +0 -0
  164. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/Arc4ABIMethod/data/SignaturesContract.arc32.json +0 -0
  165. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/Arc4ABIMethod/data/SignaturesContract.clear.teal +0 -0
  166. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/Arc4InnerTxns/__init__.py +0 -0
  167. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/Arc4InnerTxns/contract.py +0 -0
  168. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/Arc4InnerTxns/data/Arc4InnerTxnsContract.approval.teal +0 -0
  169. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/Arc4InnerTxns/data/Arc4InnerTxnsContract.arc32.json +0 -0
  170. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/Arc4InnerTxns/data/Arc4InnerTxnsContract.clear.teal +0 -0
  171. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/Arc4PrimitiveOps/__init__.py +0 -0
  172. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/Arc4PrimitiveOps/contract.py +0 -0
  173. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/Arc4PrimitiveOps/data/Arc4PrimitiveOpsContract.approval.teal +0 -0
  174. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/Arc4PrimitiveOps/data/Arc4PrimitiveOpsContract.arc32.json +0 -0
  175. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/Arc4PrimitiveOps/data/Arc4PrimitiveOpsContract.clear.teal +0 -0
  176. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/BoxContract/__init__.py +0 -0
  177. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/BoxContract/contract.py +0 -0
  178. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/BoxContract/data/BoxContract.approval.teal +0 -0
  179. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/BoxContract/data/BoxContract.arc32.json +0 -0
  180. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/BoxContract/data/BoxContract.clear.teal +0 -0
  181. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/CryptoOps/__init__.py +0 -0
  182. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/CryptoOps/contract.py +0 -0
  183. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/CryptoOps/data/CryptoOpsContract.approval.teal +0 -0
  184. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/CryptoOps/data/CryptoOpsContract.arc32.json +0 -0
  185. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/CryptoOps/data/CryptoOpsContract.clear.teal +0 -0
  186. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/GlobalStateValidator/__init__.py +0 -0
  187. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/GlobalStateValidator/contract.py +0 -0
  188. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/GlobalStateValidator/data/GlobalStateValidator.approval.teal +0 -0
  189. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/GlobalStateValidator/data/GlobalStateValidator.arc32.json +0 -0
  190. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/GlobalStateValidator/data/GlobalStateValidator.clear.teal +0 -0
  191. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/MiscellaneousOps/__init__.py +0 -0
  192. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/MiscellaneousOps/contract.py +0 -0
  193. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/MiscellaneousOps/data/MiscellaneousOpsContract.approval.teal +0 -0
  194. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/MiscellaneousOps/data/MiscellaneousOpsContract.arc32.json +0 -0
  195. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/MiscellaneousOps/data/MiscellaneousOpsContract.clear.teal +0 -0
  196. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/PrimitiveOps/__init__.py +0 -0
  197. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/PrimitiveOps/contract.py +0 -0
  198. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/PrimitiveOps/data/PrimitiveOpsContract.approval.teal +0 -0
  199. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/PrimitiveOps/data/PrimitiveOpsContract.arc32.json +0 -0
  200. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/PrimitiveOps/data/PrimitiveOpsContract.clear.teal +0 -0
  201. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateMutations/__init__.py +0 -0
  202. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateMutations/data/Contract.approval.teal +0 -0
  203. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateMutations/data/Contract.arc32.json +0 -0
  204. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateMutations/data/Contract.clear.teal +0 -0
  205. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateMutations/statemutations.py +0 -0
  206. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/__init__.py +0 -0
  207. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/contract.py +0 -0
  208. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/GlobalStateContract.approval.teal +0 -0
  209. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/GlobalStateContract.arc32.json +0 -0
  210. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/GlobalStateContract.clear.teal +0 -0
  211. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/ITxnOpsContract.approval.teal +0 -0
  212. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/ITxnOpsContract.arc32.json +0 -0
  213. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/ITxnOpsContract.clear.teal +0 -0
  214. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/LocalStateContract.approval.teal +0 -0
  215. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/LocalStateContract.arc32.json +0 -0
  216. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/LocalStateContract.clear.teal +0 -0
  217. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/StateAcctParamsGet.approval.teal +0 -0
  218. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/StateAcctParamsGet.arc32.json +0 -0
  219. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/StateAcctParamsGet.clear.teal +0 -0
  220. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/StateAcctParamsGetContract.approval.teal +0 -0
  221. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/StateAcctParamsGetContract.arc32.json +0 -0
  222. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/StateAcctParamsGetContract.clear.teal +0 -0
  223. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/StateAppGlobalContract.approval.teal +0 -0
  224. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/StateAppGlobalContract.arc32.json +0 -0
  225. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/StateAppGlobalContract.clear.teal +0 -0
  226. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/StateAppGlobalExContract.approval.teal +0 -0
  227. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/StateAppGlobalExContract.arc32.json +0 -0
  228. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/StateAppGlobalExContract.clear.teal +0 -0
  229. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/StateAppLocalContract.approval.teal +0 -0
  230. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/StateAppLocalContract.arc32.json +0 -0
  231. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/StateAppLocalContract.clear.teal +0 -0
  232. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/StateAppLocalExContract.approval.teal +0 -0
  233. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/StateAppLocalExContract.arc32.json +0 -0
  234. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/StateAppLocalExContract.clear.teal +0 -0
  235. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/StateAppParamsContract.approval.teal +0 -0
  236. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/StateAppParamsContract.arc32.json +0 -0
  237. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/StateAppParamsContract.clear.teal +0 -0
  238. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/StateAssetHoldingContract.approval.teal +0 -0
  239. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/StateAssetHoldingContract.arc32.json +0 -0
  240. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/StateAssetHoldingContract.clear.teal +0 -0
  241. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/StateAssetParamsContract.approval.teal +0 -0
  242. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/StateAssetParamsContract.arc32.json +0 -0
  243. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/StateOps/data/StateAssetParamsContract.clear.teal +0 -0
  244. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/artifacts/__init__.py +0 -0
  245. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/common.py +0 -0
  246. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/conftest.py +0 -0
  247. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/contexts/__init__.py +0 -0
  248. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/models/__init__.py +0 -0
  249. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/models/test_uenumerate.py +0 -0
  250. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/models/test_urange.py +0 -0
  251. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/primitives/__init__.py +0 -0
  252. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/primitives/conftest.py +0 -0
  253. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/primitives/test_biguint.py +0 -0
  254. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/primitives/test_bytes.py +0 -0
  255. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/primitives/test_string.py +0 -0
  256. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/primitives/test_uint64.py +0 -0
  257. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/state/__init__.py +0 -0
  258. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/state/conftest.py +0 -0
  259. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/state/test_mutations.py +0 -0
  260. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/test_miscellaneous_op.py +0 -0
  261. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/util.py +0 -0
  262. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/utilities/__init__.py +0 -0
  263. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/utilities/conftest.py +0 -0
  264. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/utilities/test_log.py +0 -0
  265. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/value_generators/__init__.py +0 -0
  266. {algorand_python_testing-0.3.0b7 → algorand_python_testing-0.3.0b9}/tests/value_generators/test_avm.py +0 -0
@@ -1,4 +1,12 @@
1
1
  # CHANGELOG
2
+ ## v0.3.0-beta.9 (2024-08-22)
3
+
4
+ ## v0.3.0-beta.8 (2024-08-22)
5
+
6
+ ### Feature
7
+
8
+ * include ARC4 results in log, and handle > 15 ARC4 arguments (#18) ([`fd83ee8`](https://github.com/algorandfoundation/algorand-python-testing/commit/fd83ee8525a393d4a1a66f20acdb661906d84b51))
9
+
2
10
  ## v0.3.0-beta.7 (2024-08-21)
3
11
 
4
12
  ## v0.3.0-beta.6 (2024-08-21)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: algorand-python-testing
3
- Version: 0.3.0b7
3
+ Version: 0.3.0b9
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
@@ -12,7 +12,6 @@ For all `algopy.arc4` types with and without respective _value generator_, insta
12
12
 
13
13
  ```{testsetup}
14
14
  import algopy
15
- import algopy_testing
16
15
  from algopy_testing import algopy_testing_context
17
16
 
18
17
  # Create the context manager for snippets below
@@ -8,7 +8,6 @@ For 'primitive `algopy` types such as `Account`, `Application`, `Asset`, `UInt64
8
8
 
9
9
  ```{testsetup}
10
10
  import algopy
11
- import algopy_testing
12
11
  from algopy_testing import algopy_testing_context
13
12
 
14
13
  # Create the context manager for snippets below
@@ -6,7 +6,6 @@ The [coverage](coverage.md) file provides a comprehensive list of all opcodes an
6
6
 
7
7
  ```{testsetup}
8
8
  import algopy
9
- import algopy_testing
10
9
  from algopy_testing import algopy_testing_context
11
10
 
12
11
  # Create the context manager for snippets below
@@ -29,7 +28,7 @@ The following opcodes are demonstrated:
29
28
  - `op.ecdsa_verify`
30
29
 
31
30
  ```{testcode}
32
- import algopy.op as op
31
+ from algopy import op
33
32
 
34
33
  # SHA256 hash
35
34
  data = algopy.Bytes(b"Hello, World!")
@@ -59,7 +58,7 @@ The following opcodes are demonstrated:
59
58
  - `op.setbit_uint64`
60
59
 
61
60
  ```{testcode}
62
- import algopy.op as op
61
+ from algopy import op
63
62
 
64
63
  # Addition with carry
65
64
  result, carry = op.addw(algopy.UInt64(2**63), algopy.UInt64(2**63))
@@ -80,7 +79,7 @@ These types necessitate interaction with the transaction context:
80
79
  ### algopy.op.Global
81
80
 
82
81
  ```{testcode}
83
- import algopy.op as op
82
+ from algopy import op
84
83
 
85
84
  class MyContract(algopy.ARC4Contract):
86
85
  @algopy.arc4.abimethod
@@ -102,12 +101,12 @@ assert result == algopy.UInt64(101000)
102
101
  ### algopy.op.Txn
103
102
 
104
103
  ```{testcode}
105
- import algopy.op as op
104
+ from algopy import op
106
105
 
107
106
  class MyContract(algopy.ARC4Contract):
108
107
  @algopy.arc4.abimethod
109
- def check_txn_fields(self) -> algopy.Bytes:
110
- return op.Txn.sender
108
+ def check_txn_fields(self) -> algopy.arc4.Address:
109
+ return algopy.arc4.Address(op.Txn.sender)
111
110
 
112
111
  ... # setup context (below assumes available under 'ctx' variable)
113
112
 
@@ -121,7 +120,7 @@ assert result == custom_sender
121
120
  ### algopy.op.AssetHoldingGet
122
121
 
123
122
  ```{testcode}
124
- import algopy.op as op
123
+ from algopy import op
125
124
 
126
125
  class AssetContract(algopy.ARC4Contract):
127
126
  @algopy.arc4.abimethod
@@ -141,7 +140,7 @@ assert result == algopy.UInt64(5000)
141
140
  ### algopy.op.AppGlobal
142
141
 
143
142
  ```{testcode}
144
- import algopy.op as op
143
+ from algopy import op
145
144
 
146
145
  class StateContract(algopy.ARC4Contract):
147
146
  @algopy.arc4.abimethod
@@ -162,7 +161,7 @@ assert stored_value == 42
162
161
  ### algopy.op.Block
163
162
 
164
163
  ```{testcode}
165
- import algopy.op as op
164
+ from algopy import op
166
165
 
167
166
  class BlockInfoContract(algopy.ARC4Contract):
168
167
  @algopy.arc4.abimethod
@@ -180,7 +179,7 @@ assert seed == algopy.op.itob(123456)
180
179
  ### algopy.op.AcctParamsGet
181
180
 
182
181
  ```{testcode}
183
- import algopy.op as op
182
+ from algopy import op
184
183
 
185
184
  class AccountParamsContract(algopy.ARC4Contract):
186
185
  @algopy.arc4.abimethod
@@ -205,7 +204,7 @@ class AppParamsContract(algopy.ARC4Contract):
205
204
  def get_app_creator(self, app_id: algopy.Application) -> algopy.arc4.Address:
206
205
  creator, exists = algopy.op.AppParamsGet.app_creator(app_id)
207
206
  assert exists
208
- return creator
207
+ return algopy.arc4.Address(creator)
209
208
 
210
209
  ... # setup context (below assumes available under 'ctx' variable)
211
210
 
@@ -218,8 +217,7 @@ assert creator == context.default_sender
218
217
  ### algopy.op.AssetParamsGet
219
218
 
220
219
  ```{testcode}
221
- from algopy_testing import algopy_testing_context
222
- import algopy.op as op
220
+ from algopy import op
223
221
 
224
222
  class AssetParamsContract(algopy.ARC4Contract):
225
223
  @algopy.arc4.abimethod
@@ -239,8 +237,7 @@ assert total == algopy.UInt64(1000000)
239
237
  ### algopy.op.Box
240
238
 
241
239
  ```{testcode}
242
- from algopy_testing import algopy_testing_context
243
- import algopy.op as op
240
+ from algopy import op
244
241
 
245
242
  class BoxStorageContract(algopy.ARC4Contract):
246
243
  @algopy.arc4.abimethod
@@ -329,23 +326,22 @@ assert result == 11
329
326
  ```{testcode}
330
327
  from unittest.mock import patch, MagicMock
331
328
  import algopy
332
- from algopy_testing.primitives import Bytes
333
329
 
334
330
  def test_mock_vrf_verify():
335
- mock_result = (Bytes(b'mock_output'), True)
331
+ mock_result = (algopy.Bytes(b'mock_output'), True)
336
332
  with patch('algopy.op.vrf_verify', return_value=mock_result) as mock_vrf_verify:
337
333
  result = algopy.op.vrf_verify(
338
334
  algopy.op.VrfVerify.VrfAlgorand,
339
- Bytes(b'proof'),
340
- Bytes(b'message'),
341
- Bytes(b'public_key')
335
+ algopy.Bytes(b'proof'),
336
+ algopy.Bytes(b'message'),
337
+ algopy.Bytes(b'public_key')
342
338
  )
343
339
  assert result == mock_result
344
340
  mock_vrf_verify.assert_called_once_with(
345
341
  algopy.op.VrfVerify.VrfAlgorand,
346
- Bytes(b'proof'),
347
- Bytes(b'message'),
348
- Bytes(b'public_key')
342
+ algopy.Bytes(b'proof'),
343
+ algopy.Bytes(b'message'),
344
+ algopy.Bytes(b'public_key')
349
345
  )
350
346
 
351
347
  test_mock_vrf_verify()
@@ -356,19 +352,18 @@ test_mock_vrf_verify()
356
352
  ```{testcode}
357
353
  from unittest.mock import patch, MagicMock
358
354
  import algopy
359
- from algopy_testing.primitives import Bytes
360
355
 
361
356
  def test_mock_elliptic_curve_decompress():
362
- mock_result = (Bytes(b'x_coord'), Bytes(b'y_coord'))
357
+ mock_result = (algopy.Bytes(b'x_coord'), algopy.Bytes(b'y_coord'))
363
358
  with patch('algopy.op.EllipticCurve.decompress', return_value=mock_result) as mock_decompress:
364
359
  result = algopy.op.EllipticCurve.decompress(
365
360
  algopy.op.EC.BN254g1,
366
- Bytes(b'compressed_point')
361
+ algopy.Bytes(b'compressed_point')
367
362
  )
368
363
  assert result == mock_result
369
364
  mock_decompress.assert_called_once_with(
370
365
  algopy.op.EC.BN254g1,
371
- Bytes(b'compressed_point')
366
+ algopy.Bytes(b'compressed_point')
372
367
  )
373
368
 
374
369
  test_mock_elliptic_curve_decompress()
@@ -4,7 +4,6 @@ Test Algorand smart signatures (LogicSigs) with ease using the Algorand Python T
4
4
 
5
5
  ```{testsetup}
6
6
  import algopy
7
- import algopy_testing
8
7
  from algopy_testing import algopy_testing_context
9
8
 
10
9
  # Create the context manager for snippets below
@@ -4,7 +4,6 @@
4
4
 
5
5
  ```{testsetup}
6
6
  import algopy
7
- import algopy_testing
8
7
  from algopy_testing import algopy_testing_context
9
8
 
10
9
  # Create the context manager for snippets below
@@ -115,8 +115,8 @@ from algopy_testing import AlgopyTestContext, algopy_testing_context
115
115
 
116
116
  class SimpleContract(algopy.ARC4Contract):
117
117
  @algopy.arc4.abimethod
118
- def check_sender(self) -> algopy.Bytes:
119
- return algopy.Txn.sender
118
+ def check_sender(self) -> algopy.arc4.Address:
119
+ return algopy.arc4.Address(algopy.Txn.sender)
120
120
  ...
121
121
 
122
122
  # Create a contract instance
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "algorand-python-testing"
7
- version = "0.3.0-beta.7"
7
+ version = "0.3.0-beta.9"
8
8
  description = 'Algorand Python testing library'
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.12"
@@ -41,7 +41,7 @@ Source = "https://github.com/algorandfoundation/puya/tree/main/algopy_testing"
41
41
  allow-direct-references = true
42
42
 
43
43
  [tool.hatch.build.targets.wheel]
44
- packages = ["src/algopy", 'src/algopy_testing']
44
+ packages = ["src/algopy", 'src/algopy_testing', 'src/_algopy_testing']
45
45
 
46
46
  [[tool.hatch.envs.all.matrix]]
47
47
  python = ["3.12"]
@@ -126,7 +126,6 @@ clean_dist = "rm -rf dist"
126
126
 
127
127
  # docs environment
128
128
  [tool.hatch.envs.docs]
129
- detached = true
130
129
  path = ".venv.docs"
131
130
  type = "virtual"
132
131
  python = "3.12"
@@ -141,13 +140,13 @@ dependencies = [
141
140
  "ipykernel",
142
141
  "pytest",
143
142
  "py-algorand-sdk",
144
- "algokit-utils",
145
- "pycryptodomex>=3.6.0,<4",
146
- "pynacl>=1.4.0,<2",
147
- "ecdsa>=0.17.0",
148
- "coincurve>=19.0.1",
149
- "algorand-python",
150
- "algorand-python-testing @ {root:uri}",
143
+ ]
144
+ # environment has algopy_testing included as an editable dependency
145
+ # however it also includes the package dependencies
146
+ # the stubs can't be in the same as the project when it is editable
147
+ # so explicitly remove them
148
+ post-install-commands = [
149
+ "hatch run docs:pip uninstall -y algorand-python",
151
150
  ]
152
151
 
153
152
  [tool.hatch.envs.docs.scripts]
@@ -1,14 +1,11 @@
1
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
2
  from _algopy_testing.context import AlgopyTestContext
3
+ from _algopy_testing.context_helpers.context_storage import algopy_testing_context
4
+ from _algopy_testing.context_helpers.ledger_context import LedgerContext
5
+ from _algopy_testing.context_helpers.txn_context import TransactionContext
10
6
  from _algopy_testing.decorators.subroutine import subroutine
11
7
  from _algopy_testing.enums import OnCompleteAction, TransactionType
8
+ from _algopy_testing.itxn_loader import ITxnGroupLoader, ITxnLoader
12
9
  from _algopy_testing.models import (
13
10
  Account,
14
11
  Application,
@@ -24,6 +21,9 @@ from _algopy_testing.models import (
24
21
  )
25
22
  from _algopy_testing.primitives import BigUInt, Bytes, String, UInt64
26
23
  from _algopy_testing.state import Box, BoxMap, BoxRef, GlobalState, LocalState
24
+ from _algopy_testing.value_generators.arc4 import ARC4ValueGenerator
25
+ from _algopy_testing.value_generators.avm import AVMValueGenerator
26
+ from _algopy_testing.value_generators.txn import TxnValueGenerator
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,
@@ -8,11 +8,6 @@ import typing
8
8
  import algosdk
9
9
  from Cryptodome.Hash import SHA512
10
10
 
11
- from _algopy_testing._mutable import (
12
- MutableBytes,
13
- add_mutable_callback,
14
- set_item_on_mutate,
15
- )
16
11
  from _algopy_testing.constants import (
17
12
  ARC4_RETURN_PREFIX,
18
13
  BITS_IN_BYTE,
@@ -21,6 +16,11 @@ from _algopy_testing.constants import (
21
16
  UINT512_SIZE,
22
17
  )
23
18
  from _algopy_testing.models.account import Account
19
+ from _algopy_testing.mutable import (
20
+ MutableBytes,
21
+ add_mutable_callback,
22
+ set_item_on_mutate,
23
+ )
24
24
  from _algopy_testing.primitives import Bytes
25
25
  from _algopy_testing.protocols import BytesBacked
26
26
  from _algopy_testing.utils import (
@@ -62,6 +62,8 @@ __all__ = [
62
62
  "UInt8",
63
63
  "UIntN",
64
64
  "abi_call",
65
+ "arc4_create",
66
+ "arc4_update",
65
67
  "arc4_signature",
66
68
  "emit",
67
69
  ]
@@ -216,7 +218,7 @@ class String(_ABIEncoded):
216
218
  f"value must be a string or String type, not {type(value).__name__!r}"
217
219
  )
218
220
 
219
- self._value = len(bytes_value).to_bytes(_ABI_LENGTH_SIZE) + bytes_value
221
+ self._value = as_bytes(_encode_length(len(bytes_value)) + bytes_value)
220
222
 
221
223
  @property
222
224
  def native(self) -> algopy.String:
@@ -533,25 +535,12 @@ class Byte(UIntN[typing.Literal[8]]):
533
535
 
534
536
 
535
537
  UInt8: typing.TypeAlias = UIntN[typing.Literal[8]]
536
- """An ARC4 UInt8."""
537
-
538
538
  UInt16: typing.TypeAlias = UIntN[typing.Literal[16]]
539
- """An ARC4 UInt16."""
540
-
541
539
  UInt32: typing.TypeAlias = UIntN[typing.Literal[32]]
542
- """An ARC4 UInt32."""
543
-
544
540
  UInt64: typing.TypeAlias = UIntN[typing.Literal[64]]
545
- """An ARC4 UInt64."""
546
-
547
541
  UInt128: typing.TypeAlias = BigUIntN[typing.Literal[128]]
548
- """An ARC4 UInt128."""
549
-
550
542
  UInt256: typing.TypeAlias = BigUIntN[typing.Literal[256]]
551
- """An ARC4 UInt256."""
552
-
553
543
  UInt512: typing.TypeAlias = BigUIntN[typing.Literal[512]]
554
- """An ARC4 UInt512."""
555
544
 
556
545
 
557
546
  class _BoolTypeInfo(_TypeInfo):
@@ -665,6 +654,8 @@ class StaticArray(
665
654
  super().__init__()
666
655
  items = _check_is_arc4(_items)
667
656
  for item in items:
657
+ if len(items) != self._type_info.size:
658
+ raise TypeError(f"expected {self._type_info.size} items, not {len(items)}")
668
659
  if self._type_info.item_type != item._type_info:
669
660
  raise TypeError(
670
661
  f"item must be of type {self._type_info.item_type!r}, not {item._type_info!r}"
@@ -735,10 +726,10 @@ class Address(StaticArray[Byte, typing.Literal[32]]):
735
726
  bytes_value = algosdk.encoding.decode_address(value)
736
727
  except Exception as e:
737
728
  raise ValueError(f"cannot encode the following address: {value!r}") from e
729
+ elif isinstance(value, Account):
730
+ bytes_value = value.bytes.value
738
731
  else:
739
- bytes_value = (
740
- value.bytes.value if isinstance(value, Account) else as_bytes(value, max_size=32)
741
- )
732
+ bytes_value = as_bytes(value)
742
733
  if len(bytes_value) != 32:
743
734
  raise ValueError(f"expected 32 bytes, got: {len(bytes_value)}")
744
735
  self._value = bytes_value
@@ -1124,14 +1115,6 @@ class Struct(MutableBytes, _ABIEncoded, metaclass=_StructMeta): # type: ignore[
1124
1115
  tuple_value = tuple_type.from_bytes(value)
1125
1116
  return cls(*tuple_value.native)
1126
1117
 
1127
- @classmethod
1128
- def from_log(cls, log: algopy.Bytes, /) -> typing.Self:
1129
- """Load an ABI type from application logs, checking for the ABI return prefix
1130
- `0x151f7c75`"""
1131
- if log[:4] == ARC4_RETURN_PREFIX:
1132
- return cls.from_bytes(log[4:])
1133
- raise ValueError("ABI return prefix not found")
1134
-
1135
1118
  @property
1136
1119
  def bytes(self) -> algopy.Bytes:
1137
1120
  """Get the underlying bytes[]"""
@@ -1212,7 +1195,7 @@ def native_value_to_arc4(value: object) -> _ABIEncoded: # noqa: PLR0911
1212
1195
  if isinstance(value, algopy.String):
1213
1196
  return String(value)
1214
1197
  if isinstance(value, tuple):
1215
- return Tuple(value)
1198
+ return Tuple(tuple(map(native_value_to_arc4, value)))
1216
1199
  raise TypeError(f"Unsupported type: {type(value).__name__}")
1217
1200
 
1218
1201
 
@@ -4,8 +4,8 @@ import typing
4
4
 
5
5
  import algosdk
6
6
 
7
- from _algopy_testing._context_helpers import LedgerContext, TransactionContext
8
- from _algopy_testing._value_generators import AlgopyValueGenerator
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
@@ -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 _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
12
  from _algopy_testing.context import AlgopyTestContext
13
+ from _algopy_testing.context_helpers.ledger_context import LedgerContext
14
+ from _algopy_testing.context_helpers.txn_context import TransactionContext, TransactionGroup
16
15
  from _algopy_testing.models.account import AccountContextData
17
16
  from _algopy_testing.models.application import ApplicationContextData
18
17
  from _algopy_testing.models.asset import AssetFields
18
+ from _algopy_testing.value_generators import AlgopyValueGenerator
19
19
 
20
20
  _var: ContextVar[AlgopyTestContext] = ContextVar("_var")
21
21
 
@@ -47,7 +47,7 @@ class _InternalContext:
47
47
  def any(self) -> AlgopyValueGenerator:
48
48
  return self.value.any
49
49
 
50
- def get_active_txn_fields(self) -> dict[str, typing.Any]:
50
+ def get_active_txn_overrides(self) -> dict[str, typing.Any]:
51
51
  active_group = self.txn._active_group
52
52
  if active_group is None:
53
53
  return {}
@@ -78,13 +78,13 @@ class _InternalContext:
78
78
 
79
79
  def get_asset_data(self, asset_id: int | algopy.UInt64) -> AssetFields:
80
80
  try:
81
- return self.ledger.asset_data[int(asset_id)]
81
+ return self.ledger._asset_data[int(asset_id)]
82
82
  except KeyError:
83
83
  raise ValueError("Unknown asset, check correct testing context is active") from None
84
84
 
85
85
  def get_account_data(self, account_public_key: str) -> AccountContextData:
86
86
  try:
87
- return self.ledger.account_data[account_public_key]
87
+ return self.ledger._account_data[account_public_key]
88
88
  except KeyError:
89
89
  raise ValueError("Unknown account, check correct testing context is active") from None
90
90
 
@@ -23,25 +23,25 @@ class LedgerContext:
23
23
  def __init__(self) -> None:
24
24
  from _algopy_testing.models.account import AccountContextData, get_empty_account
25
25
 
26
- self.account_data = defaultdict[str, AccountContextData](get_empty_account)
27
- self.app_data: dict[int, ApplicationContextData] = {}
28
- self.asset_data: dict[int, AssetFields] = {}
29
- self.blocks: dict[int, dict[str, int]] = {}
30
- self.global_fields: GlobalFields = get_default_global_fields()
26
+ self._account_data = defaultdict[str, AccountContextData](get_empty_account)
27
+ self._app_data: dict[int, ApplicationContextData] = {}
28
+ self._asset_data: dict[int, AssetFields] = {}
29
+ self._blocks: dict[int, dict[str, int]] = {}
30
+ self._global_fields: GlobalFields = get_default_global_fields()
31
31
 
32
32
  self._asset_id = iter(range(1001, 2**64))
33
33
  self._app_id = iter(range(1001, 2**64))
34
34
 
35
- def get_next_asset_id(self) -> int:
35
+ def _get_next_asset_id(self) -> int:
36
36
  while True:
37
37
  asset_id = next(self._asset_id)
38
- if asset_id not in self.asset_data:
38
+ if asset_id not in self._asset_data:
39
39
  return asset_id
40
40
 
41
- def get_next_app_id(self) -> int:
41
+ def _get_next_app_id(self) -> int:
42
42
  while True:
43
43
  app_id = next(self._app_id)
44
- if app_id not in self.app_data:
44
+ if app_id not in self._app_data:
45
45
  return app_id
46
46
 
47
47
  def get_account(self, address: str) -> algopy.Account:
@@ -68,7 +68,7 @@ class LedgerContext:
68
68
  bool: True if the account exists, False otherwise.
69
69
  """
70
70
  assert_address_is_valid(address)
71
- return address in self.account_data
71
+ return address in self._account_data
72
72
 
73
73
  def update_account(
74
74
  self,
@@ -84,11 +84,11 @@ class LedgerContext:
84
84
  **account_fields: The fields to update.
85
85
  """
86
86
  assert_address_is_valid(address)
87
- self.account_data[address].fields.update(account_fields)
87
+ self._account_data[address].fields.update(account_fields)
88
88
 
89
89
  if opted_asset_balances is not None:
90
90
  for asset_id, balance in opted_asset_balances.items():
91
- self.account_data[address].opted_asset_balances[UInt64(asset_id)] = balance
91
+ self._account_data[address].opted_asset_balances[UInt64(asset_id)] = balance
92
92
 
93
93
  def get_asset(self, asset_id: algopy.UInt64 | int) -> algopy.Asset:
94
94
  """Get an asset by ID.
@@ -105,7 +105,7 @@ class LedgerContext:
105
105
  import algopy
106
106
 
107
107
  asset_id = int(asset_id) if isinstance(asset_id, algopy.UInt64) else asset_id
108
- if asset_id not in self.asset_data:
108
+ if asset_id not in self._asset_data:
109
109
  raise ValueError("Asset not found in testing context!")
110
110
 
111
111
  return algopy.Asset(asset_id)
@@ -122,7 +122,7 @@ class LedgerContext:
122
122
  import algopy
123
123
 
124
124
  asset_id = int(asset_id) if isinstance(asset_id, algopy.UInt64) else asset_id
125
- return asset_id in self.asset_data
125
+ return asset_id in self._asset_data
126
126
 
127
127
  def update_asset(self, asset_id: int, **asset_fields: typing.Unpack[AssetFields]) -> None:
128
128
  """Update asset fields.
@@ -134,9 +134,9 @@ class LedgerContext:
134
134
  Raises:
135
135
  ValueError: If the asset is not found.
136
136
  """
137
- if asset_id not in self.asset_data:
137
+ if asset_id not in self._asset_data:
138
138
  raise ValueError("Asset not found in testing context!")
139
- self.asset_data[asset_id].update(asset_fields)
139
+ self._asset_data[asset_id].update(asset_fields)
140
140
 
141
141
  def get_app(
142
142
  self, app_id: algopy.Contract | algopy.Application | algopy.UInt64 | int
@@ -164,7 +164,7 @@ class LedgerContext:
164
164
  bool: True if the application exists, False otherwise.
165
165
  """
166
166
  app_id = _get_app_id(app_id)
167
- return app_id in self.app_data
167
+ return app_id in self._app_data
168
168
 
169
169
  def update_app(
170
170
  self, app_id: int, **application_fields: typing.Unpack[ApplicationFields]
@@ -343,7 +343,7 @@ class LedgerContext:
343
343
  seed (algopy.UInt64 | int): The block seed.
344
344
  timestamp (algopy.UInt64 | int): The block timestamp.
345
345
  """
346
- self.blocks[index] = {"seed": int(seed), "timestamp": int(timestamp)}
346
+ self._blocks[index] = {"seed": int(seed), "timestamp": int(timestamp)}
347
347
 
348
348
  def get_block_content(self, index: int, key: str) -> int:
349
349
  """Get block content.
@@ -358,7 +358,7 @@ class LedgerContext:
358
358
  Raises:
359
359
  ValueError: If the block content is not found.
360
360
  """
361
- content = self.blocks.get(index, {}).get(key, None)
361
+ content = self._blocks.get(index, {}).get(key, None)
362
362
  if content is None:
363
363
  raise KeyError(
364
364
  f"Block content for index {index} and key {key} not found in testing context!"
@@ -383,7 +383,7 @@ class LedgerContext:
383
383
  f"Invalid field(s) found during patch for `Global`: {', '.join(invalid_keys)}"
384
384
  )
385
385
 
386
- self.global_fields.update(global_fields)
386
+ self._global_fields.update(global_fields)
387
387
 
388
388
  def _get_app_data(
389
389
  self, app: algopy.UInt64 | algopy.Application | algopy.Contract | int
@@ -401,7 +401,7 @@ class LedgerContext:
401
401
  """
402
402
  app_id = _get_app_id(app)
403
403
  try:
404
- return self.app_data[app_id]
404
+ return self._app_data[app_id]
405
405
  except KeyError:
406
406
  raise ValueError("Unknown app id, is there an active transaction?") from None
407
407