Skip to content

Commit 4702f60

Browse files
committed
docs: include usage of algopy_testing_context in README.md quick start
1 parent 77e8a14 commit 4702f60

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

README.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,18 @@ Alternatively, if you want to start from scratch:
3232
```python
3333
from algopy_testing import algopy_testing_context
3434
from your_contract import YourContract
35-
35+
3636
def test_your_contract():
37-
# Arrange
38-
contract = YourContract()
39-
expected_result = ... # Your expected result here
40-
41-
# Act
42-
result = contract.your_method() # Your test code here
43-
44-
# Assert
45-
assert result == expected_result
37+
with algopy_testing_context() as context:
38+
# Arrange
39+
contract = YourContract()
40+
expected_result = ... # Your expected result here
41+
42+
# Act
43+
result = contract.your_method(context.any.uint64()) # Your test code here
44+
45+
# Assert
46+
assert result == expected_result
4647
```
4748

4849
5. Run your tests using your preferred Python testing framework (e.g., pytest, unittest)

0 commit comments

Comments
 (0)