Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move async test to _async #21363

Merged
merged 1 commit into from
Oct 21, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)