Skip to content

Commit

Permalink
move async test to _async (#21363)
Browse files Browse the repository at this point in the history
  • Loading branch information
xiangyan99 committed Oct 21, 2021
1 parent 8eeff8e commit 669e03d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from azure.core.exceptions import HttpResponseError
from utils import HTTP_REQUESTS, request_and_responses_product
import pytest
import sys


# transport = mock.MagicMock(spec=AsyncHttpTransport)
Expand Down Expand Up @@ -979,3 +980,12 @@ async def test_recursive_multipart_receive(http_request, mock_response):

internal_response0 = internal_parts[0]
assert internal_response0.status_code == 400


@pytest.mark.skipif(sys.version_info < (3, 10), reason="Loop parameter is deprecated since Python 3.10")
def test_aiohttp_loop():
import asyncio
from azure.core.pipeline.transport import AioHttpTransport
loop = asyncio.get_event_loop()
with pytest.raises(ValueError):
transport = AioHttpTransport(loop=loop)
9 changes: 0 additions & 9 deletions sdk/core/azure-core/tests/test_basic_transport.py
Original file line number Diff line number Diff line change
Expand Up @@ -1194,12 +1194,3 @@ def test_conflict_timeout(caplog, port, http_request):
with pytest.raises(ValueError):
with Pipeline(transport) as pipeline:
pipeline.run(request, connection_timeout=(100, 100), read_timeout = 100)


@pytest.mark.skipif(sys.version_info < (3, 10), reason="Loop parameter is deprecated since Python 3.10")
def test_aiohttp_loop():
import asyncio
from azure.core.pipeline.transport import AioHttpTransport
loop = asyncio.get_event_loop()
with pytest.raises(ValueError):
transport = AioHttpTransport(loop=loop)

0 comments on commit 669e03d

Please sign in to comment.