Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 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
5 changes: 1 addition & 4 deletions sdk/storage/azure-storage-queue/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,8 @@
# --------------------------------------------------------------------------

import sys
import pytest
import platform


# Ignore async tests for Python < 3.5
collect_ignore_glob = []
if sys.version_info < (3, 5) or platform.python_implementation() == 'PyPy':
if sys.version_info < (3, 5):
collect_ignore_glob.append("tests/*_async.py")
29 changes: 29 additions & 0 deletions sdk/storage/azure-storage-queue/tests/asyncqueuetestcase.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# coding: utf-8
# -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
import asyncio
import functools
from queuetestcase import QueueTestCase

LOGGING_FORMAT = '%(asctime)s %(name)-20s %(levelname)-5s %(message)s'

class AsyncQueueTestCase(QueueTestCase):
@staticmethod
def await_prepared_test(test_fn):
"""Synchronous wrapper for async test methods. Used to avoid making changes
upstream to AbstractPreparer (which doesn't await the functions it wraps)
"""

@functools.wraps(test_fn)
def run(test_class_instance, *args, **kwargs):
resource_group = kwargs.get("resource_group")
location = kwargs.get("location")
storage_account = kwargs.get("storage_account")
storage_account_key = kwargs.get("storage_account_key")
Comment thread
annatisch marked this conversation as resolved.
Outdated
loop = asyncio.get_event_loop()
return loop.run_until_complete(test_fn(test_class_instance, resource_group, location, storage_account, storage_account_key))

return run
56 changes: 0 additions & 56 deletions sdk/storage/azure-storage-queue/tests/queue_settings_fake.py

This file was deleted.

Loading