Skip to content

Commit

Permalink
chore: bump algorand-python-testing version, and simplify test example
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-makerx committed Aug 27, 2024
1 parent 7e7c429 commit 42feefa
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ python = "^3.12"
algokit-utils = "^2.3.0"
python-dotenv = "^1.0.0"
algorand-python = "^2.0.0"
algorand-python-testing = "^0.3.0"
algorand-python-testing = "^0.4.0"

[tool.poetry.group.dev.dependencies]
algokit-client-generator = "^1.1.3"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from collections.abc import Generator
from collections.abc import Iterator

import pytest
from algopy_testing import AlgopyTestContext, algopy_testing_context
Expand All @@ -7,10 +7,9 @@


@pytest.fixture()
def context() -> Generator[AlgopyTestContext, None, None]:
def context() -> Iterator[AlgopyTestContext]:
with algopy_testing_context() as ctx:
yield ctx
ctx.reset()


def test_hello(context: AlgopyTestContext) -> None:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ python = "^3.12"
algokit-utils = "^2.3.0"
python-dotenv = "^1.0.0"
algorand-python = "^2.0.0"
algorand-python-testing = "^0.3.0"
algorand-python-testing = "^0.4.0"

[tool.poetry.group.dev.dependencies]
black = {extras = ["d"], version = "*"}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ python = "^3.12"
algokit-utils = "^2.3.0"
python-dotenv = "^1.0.0"
algorand-python = "^2.0.0"
algorand-python-testing = "^0.3.0"
algorand-python-testing = "^0.4.0"

[tool.poetry.group.dev.dependencies]
algokit-client-generator = "^1.1.3"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ python = "^3.12"
algokit-utils = "^2.3.0"
python-dotenv = "^1.0.0"
algorand-python = "^2.0.0"
algorand-python-testing = "^0.3.0"
algorand-python-testing = "^0.4.0"

[tool.poetry.group.dev.dependencies]
puyapy = "*"
Expand Down
2 changes: 1 addition & 1 deletion examples/production_python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ python = "^3.12"
algokit-utils = "^2.3.0"
python-dotenv = "^1.0.0"
algorand-python = "^2.0.0"
algorand-python-testing = "^0.3.0"
algorand-python-testing = "^0.4.0"

[tool.poetry.group.dev.dependencies]
algokit-client-generator = "^1.1.3"
Expand Down
5 changes: 2 additions & 3 deletions examples/production_python/tests/hello_world_test.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from collections.abc import Generator
from collections.abc import Iterator

import pytest
from algopy_testing import AlgopyTestContext, algopy_testing_context
Expand All @@ -7,10 +7,9 @@


@pytest.fixture()
def context() -> Generator[AlgopyTestContext, None, None]:
def context() -> Iterator[AlgopyTestContext]:
with algopy_testing_context() as ctx:
yield ctx
ctx.reset()


def test_hello(context: AlgopyTestContext) -> None:
Expand Down
2 changes: 1 addition & 1 deletion examples/starter_python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ python = "^3.12"
algokit-utils = "^2.3.0"
python-dotenv = "^1.0.0"
algorand-python = "^2.0.0"
algorand-python-testing = "^0.3.0"
algorand-python-testing = "^0.4.0"

[tool.poetry.group.dev.dependencies]
algokit-client-generator = "^1.1.3"
Expand Down
2 changes: 1 addition & 1 deletion template_content/pyproject.toml.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ python = "^3.12"
algokit-utils = "^2.3.0"
python-dotenv = "^1.0.0"
algorand-python = "^2.0.0"
algorand-python-testing = "^0.3.0"
algorand-python-testing = "^0.4.0"

[tool.poetry.group.dev.dependencies]
{% if deployment_language == 'python' -%}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from collections.abc import Generator
from collections.abc import Iterator

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


@pytest.fixture()
def context() -> Generator[AlgopyTestContext, None, None]:
def context() -> Iterator[AlgopyTestContext]:
with algopy_testing_context() as ctx:
yield ctx
ctx.reset()


def test_hello(context: AlgopyTestContext) -> None:
Expand Down

0 comments on commit 42feefa

Please sign in to comment.