Skip to content

Commit 0f82f82

Browse files
authored
test: add async suffix to tests to avoid duplication with sync functions (#1368)
1 parent 123ee79 commit 0f82f82

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

  • packages/gapic-generator/gapic/templates/tests/unit/gapic/%name_%version/%sub

packages/gapic-generator/gapic/templates/tests/unit/gapic/%name_%version/%sub/_test_mixins.py.j2

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
{% for mode in ["", "async"] %}
55
{% if mode == "async" %}
66
@pytest.mark.asyncio
7-
async def test_delete_operation(transport: str = "grpc"):
7+
async def test_delete_operation_async(transport: str = "grpc"):
88
{% else %}
99
def test_delete_operation(transport: str = "grpc"):
1010
{% endif %}
@@ -133,7 +133,7 @@ def test_delete_operation_from_dict():
133133
{% for mode in ["", "async"] %}
134134
{% if mode == "async" %}
135135
@pytest.mark.asyncio
136-
async def test_cancel_operation(transport: str = "grpc"):
136+
async def test_cancel_operation_async(transport: str = "grpc"):
137137
{% else %}
138138
def test_cancel_operation(transport: str = "grpc"):
139139
{% endif %}
@@ -390,7 +390,7 @@ def test_wait_operation_from_dict():
390390
{% for mode in ["", "async"] %}
391391
{% if mode == "async" %}
392392
@pytest.mark.asyncio
393-
async def test_get_operation(transport: str = "grpc"):
393+
async def test_get_operation_async(transport: str = "grpc"):
394394
{% else %}
395395
def test_get_operation(transport: str = "grpc"):
396396
{% endif %}
@@ -519,7 +519,7 @@ def test_get_operation_from_dict():
519519
{% for mode in ["", "async"] %}
520520
{% if mode == "async" %}
521521
@pytest.mark.asyncio
522-
async def test_list_operations(transport: str = "grpc"):
522+
async def test_list_operations_async(transport: str = "grpc"):
523523
{% else %}
524524
def test_list_operations(transport: str = "grpc"):
525525
{% endif %}
@@ -654,7 +654,7 @@ def test_list_operations_from_dict():
654654
{% for mode in ["", "async"] %}
655655
{% if mode == "async" %}
656656
@pytest.mark.asyncio
657-
async def test_list_locations(transport: str = "grpc"):
657+
async def test_list_locations_async(transport: str = "grpc"):
658658
{% else %}
659659
def test_list_locations(transport: str = "grpc"):
660660
{% endif %}

0 commit comments

Comments
 (0)