Skip to content

Commit 42feefa

Browse files
committed
chore: bump algorand-python-testing version, and simplify test example
1 parent 7e7c429 commit 42feefa

File tree

10 files changed

+13
-16
lines changed

10 files changed

+13
-16
lines changed

examples/generators/production_python_smart_contract_python/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ python = "^3.12"
1111
algokit-utils = "^2.3.0"
1212
python-dotenv = "^1.0.0"
1313
algorand-python = "^2.0.0"
14-
algorand-python-testing = "^0.3.0"
14+
algorand-python-testing = "^0.4.0"
1515

1616
[tool.poetry.group.dev.dependencies]
1717
algokit-client-generator = "^1.1.3"

examples/generators/production_python_smart_contract_python/tests/hello_world_test.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from collections.abc import Generator
1+
from collections.abc import Iterator
22

33
import pytest
44
from algopy_testing import AlgopyTestContext, algopy_testing_context
@@ -7,10 +7,9 @@
77

88

99
@pytest.fixture()
10-
def context() -> Generator[AlgopyTestContext, None, None]:
10+
def context() -> Iterator[AlgopyTestContext]:
1111
with algopy_testing_context() as ctx:
1212
yield ctx
13-
ctx.reset()
1413

1514

1615
def test_hello(context: AlgopyTestContext) -> None:

examples/generators/production_python_smart_contract_typescript/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ python = "^3.12"
1111
algokit-utils = "^2.3.0"
1212
python-dotenv = "^1.0.0"
1313
algorand-python = "^2.0.0"
14-
algorand-python-testing = "^0.3.0"
14+
algorand-python-testing = "^0.4.0"
1515

1616
[tool.poetry.group.dev.dependencies]
1717
black = {extras = ["d"], version = "*"}

examples/generators/starter_python_smart_contract_python/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ python = "^3.12"
1111
algokit-utils = "^2.3.0"
1212
python-dotenv = "^1.0.0"
1313
algorand-python = "^2.0.0"
14-
algorand-python-testing = "^0.3.0"
14+
algorand-python-testing = "^0.4.0"
1515

1616
[tool.poetry.group.dev.dependencies]
1717
algokit-client-generator = "^1.1.3"

examples/generators/starter_python_smart_contract_typescript/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ python = "^3.12"
1111
algokit-utils = "^2.3.0"
1212
python-dotenv = "^1.0.0"
1313
algorand-python = "^2.0.0"
14-
algorand-python-testing = "^0.3.0"
14+
algorand-python-testing = "^0.4.0"
1515

1616
[tool.poetry.group.dev.dependencies]
1717
puyapy = "*"

examples/production_python/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ python = "^3.12"
1111
algokit-utils = "^2.3.0"
1212
python-dotenv = "^1.0.0"
1313
algorand-python = "^2.0.0"
14-
algorand-python-testing = "^0.3.0"
14+
algorand-python-testing = "^0.4.0"
1515

1616
[tool.poetry.group.dev.dependencies]
1717
algokit-client-generator = "^1.1.3"

examples/production_python/tests/hello_world_test.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from collections.abc import Generator
1+
from collections.abc import Iterator
22

33
import pytest
44
from algopy_testing import AlgopyTestContext, algopy_testing_context
@@ -7,10 +7,9 @@
77

88

99
@pytest.fixture()
10-
def context() -> Generator[AlgopyTestContext, None, None]:
10+
def context() -> Iterator[AlgopyTestContext]:
1111
with algopy_testing_context() as ctx:
1212
yield ctx
13-
ctx.reset()
1413

1514

1615
def test_hello(context: AlgopyTestContext) -> None:

examples/starter_python/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ python = "^3.12"
1111
algokit-utils = "^2.3.0"
1212
python-dotenv = "^1.0.0"
1313
algorand-python = "^2.0.0"
14-
algorand-python-testing = "^0.3.0"
14+
algorand-python-testing = "^0.4.0"
1515

1616
[tool.poetry.group.dev.dependencies]
1717
algokit-client-generator = "^1.1.3"

template_content/pyproject.toml.jinja

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ python = "^3.12"
1111
algokit-utils = "^2.3.0"
1212
python-dotenv = "^1.0.0"
1313
algorand-python = "^2.0.0"
14-
algorand-python-testing = "^0.3.0"
14+
algorand-python-testing = "^0.4.0"
1515

1616
[tool.poetry.group.dev.dependencies]
1717
{% if deployment_language == 'python' -%}

template_content/{% if use_python_pytest %}tests{% endif %}/{% if use_python_pytest %}{{ contract_name }}_test.py{% endif %}.jinja

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from collections.abc import Generator
1+
from collections.abc import Iterator
22

33
import pytest
44
from algopy_testing import AlgopyTestContext, algopy_testing_context
@@ -7,10 +7,9 @@ from smart_contracts.{{ contract_name }}.contract import {{ contract_name.split(
77

88

99
@pytest.fixture()
10-
def context() -> Generator[AlgopyTestContext, None, None]:
10+
def context() -> Iterator[AlgopyTestContext]:
1111
with algopy_testing_context() as ctx:
1212
yield ctx
13-
ctx.reset()
1413

1514

1615
def test_hello(context: AlgopyTestContext) -> None:

0 commit comments

Comments
 (0)