From be8ef9be3e6494b9244b7cc299d9200ca622b3d7 Mon Sep 17 00:00:00 2001 From: Yuchao Yan Date: Thu, 3 Mar 2022 02:40:13 +0800 Subject: [PATCH] Drop Python 2.7 (#1175) --- ChangeLog.md | 6 ++++- eng/pipelines/ci.yml | 26 ++++++++----------- package.json | 2 +- .../AcceptanceTests/asynctests/__init__.py | 6 ----- test/azure/legacy/AcceptanceTests/conftest.py | 5 ---- .../test_azure_custom_base_uri.py | 8 ++---- .../legacy/AcceptanceTests/test_azure_url.py | 8 ++---- .../legacy/AcceptanceTests/test_duration.py | 9 ++----- test/azure/legacy/AcceptanceTests/test_lro.py | 8 ++---- .../legacy/AcceptanceTests/test_paging.py | 9 ++----- .../legacy/AcceptanceTests/test_parameter.py | 8 ++---- test/azure/legacy/AcceptanceTests/test_xms.py | 8 ++---- .../AcceptanceTests/asynctests/__init__.py | 8 +----- .../low-level/AcceptanceTests/conftest.py | 5 ---- .../AcceptanceTests/asynctests/__init__.py | 8 +----- .../AcceptanceTests/conftest.py | 5 ---- .../AcceptanceTests/asynctests/conftest.py | 5 ---- .../dpg/low-level/AcceptanceTests/conftest.py | 5 ---- .../AcceptanceTests/conftest.py | 5 ---- test/multiapi/AcceptanceTests/conftest.py | 5 ---- .../legacy/AcceptanceTests/conftest.py | 6 ----- .../test_additional_properties.py | 9 ++----- .../legacy/AcceptanceTests/test_array.py | 10 +++---- .../legacy/AcceptanceTests/test_bool.py | 8 ++---- .../legacy/AcceptanceTests/test_byte.py | 10 +++---- .../legacy/AcceptanceTests/test_complex.py | 8 ++---- .../AcceptanceTests/test_custom_base_uri.py | 8 ++---- .../legacy/AcceptanceTests/test_date.py | 8 ++---- .../legacy/AcceptanceTests/test_datetime.py | 8 ++---- .../AcceptanceTests/test_datetime_rfc.py | 8 ++---- .../legacy/AcceptanceTests/test_dictionary.py | 8 ++---- .../legacy/AcceptanceTests/test_duration.py | 8 ++---- .../AcceptanceTests/test_extensible_enums.py | 8 ++---- .../legacy/AcceptanceTests/test_file.py | 8 ++---- .../legacy/AcceptanceTests/test_header.py | 8 ++---- .../legacy/AcceptanceTests/test_http.py | 8 ++---- .../legacy/AcceptanceTests/test_integer.py | 8 ++---- .../AcceptanceTests/test_media_types.py | 8 ++---- .../AcceptanceTests/test_model_flattening.py | 8 ++---- .../test_multiple_inheritance.py | 8 ++---- .../AcceptanceTests/test_no_operations.py | 8 ++---- .../legacy/AcceptanceTests/test_number.py | 8 ++---- .../AcceptanceTests/test_python3_only.py | 2 -- .../AcceptanceTests/test_required_optional.py | 8 ++---- .../AcceptanceTests/test_string_tests.py | 8 ++---- .../legacy/AcceptanceTests/test_time.py | 8 ++---- .../legacy/AcceptanceTests/test_url.py | 8 ++---- .../legacy/AcceptanceTests/test_validation.py | 8 ++---- .../legacy/AcceptanceTests/test_xml.py | 8 ++---- .../legacy/AcceptanceTests/test_xms_error.py | 8 ++---- .../low-level/AcceptanceTests/conftest.py | 5 ---- .../AcceptanceTests/test_content_type.py | 1 - .../AcceptanceTests/test_form_data.py | 3 --- .../AcceptanceTests/conftest.py | 5 ---- .../AcceptanceTests/test_python3_only.py | 1 - 55 files changed, 91 insertions(+), 310 deletions(-) diff --git a/ChangeLog.md b/ChangeLog.md index 194fb67e033..f2964dc8d14 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -1,6 +1,6 @@ # Change Log -### 2022-xx-xx - 5.12.7 +### 2022-03-02 - 5.13.0 | Library | Min Version | --------------- | ------- @@ -15,6 +15,10 @@ - Add default value consistently for parameters #1164 - Make `content_type` param keyword-only if there are multiple content types #1167 +**Other Changes** + +- Drop testing support for 2.7 packages #1175 + ### 2022-02-09 - 5.12.6 | Library | Min Version diff --git a/eng/pipelines/ci.yml b/eng/pipelines/ci.yml index 7be82bebfb6..942c4ffeae4 100644 --- a/eng/pipelines/ci.yml +++ b/eng/pipelines/ci.yml @@ -27,10 +27,6 @@ jobs: strategy: matrix: - Linux_Python27: - OSName: "Linux" - OSVmImage: "MMSUbuntu20.04" - PythonVersion: "2.7" Linux_Python37: OSName: "Linux" OSVmImage: "MMSUbuntu20.04" @@ -102,9 +98,9 @@ jobs: cd $(TestFolder)/azure/low-level tox -e ci displayName: 'Execute low-level "azure" Tests - Python $(PythonVersion)' - condition: and(succeededOrFailed(), ne(variables['PythonVersion'], '2.7')) + condition: succeededOrFailed() - task: PublishTestResults@2 - condition: and(succeededOrFailed(), ne(variables['PythonVersion'], '2.7')) + condition: succeededOrFailed() displayName: 'Publish low-level "azure" Test Results' inputs: testRunTitle: "$(OSName) Python $(PythonVersion) - low-level azure" @@ -114,9 +110,9 @@ jobs: cd $(TestFolder)/azure/version-tolerant tox -e ci displayName: 'Execute version-tolerant "azure" Tests - Python $(PythonVersion)' - condition: and(succeededOrFailed(), ne(variables['PythonVersion'], '2.7')) + condition: succeededOrFailed() - task: PublishTestResults@2 - condition: and(succeededOrFailed(), ne(variables['PythonVersion'], '2.7')) + condition: succeededOrFailed() displayName: 'Publish version-tolerant "azure" Test Results' inputs: testRunTitle: "$(OSName) Python $(PythonVersion) - version-tolerant azure" @@ -143,10 +139,10 @@ jobs: cd $(TestFolder)/vanilla/low-level tox -e ci displayName: 'Execute low level "vanilla" Tests - Python $(PythonVersion)' - condition: and(succeededOrFailed(), ne(variables['PythonVersion'], '2.7')) + condition: succeededOrFailed() - task: PublishTestResults@2 displayName: 'Publish low level "vanilla" Test Results' - condition: and(succeededOrFailed(), ne(variables['PythonVersion'], '2.7')) + condition: succeededOrFailed() inputs: testRunTitle: "$(OSName) Python $(PythonVersion) - low level vanilla" searchFolder: "$(TestFolder)/vanilla/low-level" @@ -155,10 +151,10 @@ jobs: cd $(TestFolder)/vanilla/version-tolerant tox -e ci displayName: 'Execute version-tolerant "vanilla" Tests - Python $(PythonVersion)' - condition: and(succeededOrFailed(), ne(variables['PythonVersion'], '2.7')) + condition: succeededOrFailed() - task: PublishTestResults@2 displayName: 'Publish version-tolerant "vanilla" Test Results' - condition: and(succeededOrFailed(), ne(variables['PythonVersion'], '2.7')) + condition: succeededOrFailed() inputs: testRunTitle: "$(OSName) Python $(PythonVersion) - version-tolerant vanilla" searchFolder: "$(TestFolder)/vanilla/version-tolerant" @@ -173,12 +169,12 @@ jobs: cd $(TestFolder)/dpg/low-level tox -e ci displayName: 'Execute low level update "dpg" Tests - Python $(PythonVersion)' - condition: and(succeededOrFailed(), ne(variables['PythonVersion'], '2.7')) + condition: succeededOrFailed() - script: | cd $(TestFolder)/dpg/version-tolerant tox -e ci displayName: 'Execute version-tolerant update "dpg" Tests - Python $(PythonVersion)' - condition: and(succeededOrFailed(), ne(variables['PythonVersion'], '2.7')) + condition: succeededOrFailed() - script: | cd $(TestFolder)/dpg/version-tolerant tox -e lint @@ -208,7 +204,7 @@ jobs: displayName: "Publish coverage report to storage account" condition: and(succeededOrFailed(), eq(variables['PythonVersion'], '3.10')) - - ${{ if eq(and(ne(variables['Build.Reason'], 'PullRequest'), ne(variables['PythonVersion'], '2.7')), 'True') }}: + - ${{ if eq(ne(variables['Build.Reason'], 'PullRequest'), 'True') }}: - script: | git clone https://github.com/Azure/azure-sdk-for-python.git --depth=1 --branch main $(Build.SourcesDirectory)/regenerated/ displayName: 'Clone python repo' diff --git a/package.json b/package.json index 22001b32158..bfabd5c146f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@autorest/python", - "version": "5.12.6", + "version": "5.13.0", "description": "The Python extension for generators in AutoRest.", "scripts": { "prepare": "node run-python3.js prepare.py", diff --git a/test/azure/legacy/AcceptanceTests/asynctests/__init__.py b/test/azure/legacy/AcceptanceTests/asynctests/__init__.py index 44607faec39..c36aaed1490 100644 --- a/test/azure/legacy/AcceptanceTests/asynctests/__init__.py +++ b/test/azure/legacy/AcceptanceTests/asynctests/__init__.py @@ -23,9 +23,3 @@ # IN THE SOFTWARE. # # -------------------------------------------------------------------------- - -import sys -import pytest - -pytestmark = pytest.mark.skipif(sys.version_info < (3,6), - reason="requires python3.6") \ No newline at end of file diff --git a/test/azure/legacy/AcceptanceTests/conftest.py b/test/azure/legacy/AcceptanceTests/conftest.py index f117b2100ef..460568dc120 100644 --- a/test/azure/legacy/AcceptanceTests/conftest.py +++ b/test/azure/legacy/AcceptanceTests/conftest.py @@ -63,11 +63,6 @@ def testserver(): yield terminate_server_process(server) -# Ignore collection of async tests for Python 2 -collect_ignore = [] -if sys.version_info < (3,5): - collect_ignore.append("asynctests") - class CookiePolicy(SansIOHTTPPolicy): def __init__(self, *args, **kwargs): diff --git a/test/azure/legacy/AcceptanceTests/test_azure_custom_base_uri.py b/test/azure/legacy/AcceptanceTests/test_azure_custom_base_uri.py index 6bbfab1331f..db842bafd1b 100644 --- a/test/azure/legacy/AcceptanceTests/test_azure_custom_base_uri.py +++ b/test/azure/legacy/AcceptanceTests/test_azure_custom_base_uri.py @@ -75,12 +75,8 @@ def test_custom_base_uri_bad_host(self, client): def test_models(self): from custombaseurl.models import Error - if sys.version_info >= (3,5): - from custombaseurl.models._models_py3 import Error as ErrorPy3 - assert Error == ErrorPy3 - else: - from custombaseurl.models._models import Error as ErrorPy2 - assert Error == ErrorPy2 + from custombaseurl.models._models_py3 import Error as ErrorPy3 + assert Error == ErrorPy3 def test_operation_groups(self): from custombaseurl.operations import PathsOperations diff --git a/test/azure/legacy/AcceptanceTests/test_azure_url.py b/test/azure/legacy/AcceptanceTests/test_azure_url.py index 789d6d4bbdc..ecce286c4fa 100644 --- a/test/azure/legacy/AcceptanceTests/test_azure_url.py +++ b/test/azure/legacy/AcceptanceTests/test_azure_url.py @@ -55,12 +55,8 @@ def test_azure_url(self, credential, authentication_policy): def test_models(self): from subscriptionidapiversion.models import Error - if sys.version_info >= (3,5): - from subscriptionidapiversion.models._models_py3 import Error as ErrorPy3 - assert Error == ErrorPy3 - else: - from subscriptionidapiversion.models._models import Error as ErrorPy2 - assert Error == ErrorPy2 + from subscriptionidapiversion.models._models_py3 import Error as ErrorPy3 + assert Error == ErrorPy3 def test_operation_groups(self): from subscriptionidapiversion.operations import GroupOperations diff --git a/test/azure/legacy/AcceptanceTests/test_duration.py b/test/azure/legacy/AcceptanceTests/test_duration.py index 64b72494f33..325c7b4b402 100644 --- a/test/azure/legacy/AcceptanceTests/test_duration.py +++ b/test/azure/legacy/AcceptanceTests/test_duration.py @@ -61,13 +61,8 @@ def test_positive_duration(self, client): def test_models(self): from bodyduration.models import Error - - if sys.version_info >= (3,5): - from bodyduration.models._models_py3 import Error as ErrorPy3 - assert Error == ErrorPy3 - else: - from bodyduration.models._models import Error as ErrorPy2 - assert Error == ErrorPy2 + from bodyduration.models._models_py3 import Error as ErrorPy3 + assert Error == ErrorPy3 def test_operation_groups(self): from bodyduration.operations import DurationOperations diff --git a/test/azure/legacy/AcceptanceTests/test_lro.py b/test/azure/legacy/AcceptanceTests/test_lro.py index c78f76efd57..48f9407e688 100644 --- a/test/azure/legacy/AcceptanceTests/test_lro.py +++ b/test/azure/legacy/AcceptanceTests/test_lro.py @@ -484,12 +484,8 @@ def test_patch202_retry_with_async_and_location_header(self, client, product): def test_models(self): from lro.models import OperationResult - if sys.version_info >= (3,5): - from lro.models._models_py3 import OperationResult as OperationResultPy3 - assert OperationResult == OperationResultPy3 - else: - from lro.models._models import OperationResult as OperationResultPy2 - assert OperationResult == OperationResultPy2 + from lro.models._models_py3 import OperationResult as OperationResultPy3 + assert OperationResult == OperationResultPy3 def test_operation_groups(self): from lro.operations import LRORetrysOperations diff --git a/test/azure/legacy/AcceptanceTests/test_paging.py b/test/azure/legacy/AcceptanceTests/test_paging.py index 9be0518de8a..28f69086ec8 100644 --- a/test/azure/legacy/AcceptanceTests/test_paging.py +++ b/test/azure/legacy/AcceptanceTests/test_paging.py @@ -180,7 +180,6 @@ def test_initial_response_no_items(self, client): items = [i for i in pages] assert len(items) == 1 - @pytest.mark.skipif(sys.version_info < (3,5), reason="2.7 does different url encoding") def test_duplicate_params(self, client): pages = list(client.paging.duplicate_params(filter="foo")) assert len(pages) == 1 @@ -189,12 +188,8 @@ def test_duplicate_params(self, client): def test_models(self): from paging.models import OperationResult - if sys.version_info >= (3,5): - from paging.models._models_py3 import OperationResult as OperationResultPy3 - assert OperationResult == OperationResultPy3 - else: - from paging.models._models import OperationResult as OperationResultPy2 - assert OperationResult == OperationResultPy2 + from paging.models._models_py3 import OperationResult as OperationResultPy3 + assert OperationResult == OperationResultPy3 def test_operation_groups(self): from paging.operations import PagingOperations diff --git a/test/azure/legacy/AcceptanceTests/test_parameter.py b/test/azure/legacy/AcceptanceTests/test_parameter.py index 7ce976072d8..29d84d7052c 100644 --- a/test/azure/legacy/AcceptanceTests/test_parameter.py +++ b/test/azure/legacy/AcceptanceTests/test_parameter.py @@ -189,12 +189,8 @@ def test_azure_odata(self, azure_client): def test_models(self): from azureparametergrouping.models import Error - if sys.version_info >= (3,5): - from azureparametergrouping.models._models_py3 import Error as ErrorPy3 - assert Error == ErrorPy3 - else: - from azureparametergrouping.models._models import Error as ErrorPy2 - assert Error == ErrorPy2 + from azureparametergrouping.models._models_py3 import Error as ErrorPy3 + assert Error == ErrorPy3 def test_operation_groups(self): from azurespecialproperties.operations import ApiVersionDefaultOperations diff --git a/test/azure/legacy/AcceptanceTests/test_xms.py b/test/azure/legacy/AcceptanceTests/test_xms.py index 8c85031a059..e56e7222d3b 100644 --- a/test/azure/legacy/AcceptanceTests/test_xms.py +++ b/test/azure/legacy/AcceptanceTests/test_xms.py @@ -95,9 +95,5 @@ def test_xms_custom_named_request_id_parameter_group(self, client): def test_models(self): from azurespecialproperties.models import Error - if sys.version_info >= (3,5): - from azurespecialproperties.models._models_py3 import Error as ErrorPy3 - assert Error == ErrorPy3 - else: - from azurespecialproperties.models._models import Error as ErrorPy2 - assert Error == ErrorPy2 + from azurespecialproperties.models._models_py3 import Error as ErrorPy3 + assert Error == ErrorPy3 diff --git a/test/azure/low-level/AcceptanceTests/asynctests/__init__.py b/test/azure/low-level/AcceptanceTests/asynctests/__init__.py index 44607faec39..9ecdd4ff2c4 100644 --- a/test/azure/low-level/AcceptanceTests/asynctests/__init__.py +++ b/test/azure/low-level/AcceptanceTests/asynctests/__init__.py @@ -22,10 +22,4 @@ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. # -# -------------------------------------------------------------------------- - -import sys -import pytest - -pytestmark = pytest.mark.skipif(sys.version_info < (3,6), - reason="requires python3.6") \ No newline at end of file +# -------------------------------------------------------------------------- \ No newline at end of file diff --git a/test/azure/low-level/AcceptanceTests/conftest.py b/test/azure/low-level/AcceptanceTests/conftest.py index 775e338eaea..8ae9739b558 100644 --- a/test/azure/low-level/AcceptanceTests/conftest.py +++ b/test/azure/low-level/AcceptanceTests/conftest.py @@ -57,11 +57,6 @@ def testserver(): yield terminate_server_process(server) -# Ignore collection of async tests for Python 2 -collect_ignore = [] -if sys.version_info < (3,5): - collect_ignore.append("asynctests") - @pytest.fixture() def base_send_request(): def send_request(client, request, **kwargs): diff --git a/test/azure/version-tolerant/AcceptanceTests/asynctests/__init__.py b/test/azure/version-tolerant/AcceptanceTests/asynctests/__init__.py index 44607faec39..9ecdd4ff2c4 100644 --- a/test/azure/version-tolerant/AcceptanceTests/asynctests/__init__.py +++ b/test/azure/version-tolerant/AcceptanceTests/asynctests/__init__.py @@ -22,10 +22,4 @@ # FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS # IN THE SOFTWARE. # -# -------------------------------------------------------------------------- - -import sys -import pytest - -pytestmark = pytest.mark.skipif(sys.version_info < (3,6), - reason="requires python3.6") \ No newline at end of file +# -------------------------------------------------------------------------- \ No newline at end of file diff --git a/test/azure/version-tolerant/AcceptanceTests/conftest.py b/test/azure/version-tolerant/AcceptanceTests/conftest.py index f117b2100ef..460568dc120 100644 --- a/test/azure/version-tolerant/AcceptanceTests/conftest.py +++ b/test/azure/version-tolerant/AcceptanceTests/conftest.py @@ -63,11 +63,6 @@ def testserver(): yield terminate_server_process(server) -# Ignore collection of async tests for Python 2 -collect_ignore = [] -if sys.version_info < (3,5): - collect_ignore.append("asynctests") - class CookiePolicy(SansIOHTTPPolicy): def __init__(self, *args, **kwargs): diff --git a/test/dpg/low-level/AcceptanceTests/asynctests/conftest.py b/test/dpg/low-level/AcceptanceTests/asynctests/conftest.py index b80f6be81dc..9e339411207 100644 --- a/test/dpg/low-level/AcceptanceTests/asynctests/conftest.py +++ b/test/dpg/low-level/AcceptanceTests/asynctests/conftest.py @@ -60,8 +60,3 @@ async def send_request(client, request): response.raise_for_status() return response return send_request - -# Ignore collection of async tests for Python 2 -collect_ignore = [] -if sys.version_info < (3,5): - collect_ignore.append("asynctests") diff --git a/test/dpg/low-level/AcceptanceTests/conftest.py b/test/dpg/low-level/AcceptanceTests/conftest.py index 21c238ecb61..9e25a5a25c1 100644 --- a/test/dpg/low-level/AcceptanceTests/conftest.py +++ b/test/dpg/low-level/AcceptanceTests/conftest.py @@ -60,8 +60,3 @@ def send_request(client, request): response.raise_for_status() return response return send_request - -# Ignore collection of async tests for Python 2 -collect_ignore = [] -if sys.version_info < (3,5): - collect_ignore.append("asynctests") diff --git a/test/dpg/version-tolerant/AcceptanceTests/conftest.py b/test/dpg/version-tolerant/AcceptanceTests/conftest.py index 370c86aa176..38d120a44f3 100644 --- a/test/dpg/version-tolerant/AcceptanceTests/conftest.py +++ b/test/dpg/version-tolerant/AcceptanceTests/conftest.py @@ -52,8 +52,3 @@ def testserver(): server = start_server_process() yield terminate_server_process(server) - -# Ignore collection of async tests for Python 2 -collect_ignore = [] -if sys.version_info < (3,5): - collect_ignore.append("asynctests") diff --git a/test/multiapi/AcceptanceTests/conftest.py b/test/multiapi/AcceptanceTests/conftest.py index d4f1b509651..3f0aea15589 100644 --- a/test/multiapi/AcceptanceTests/conftest.py +++ b/test/multiapi/AcceptanceTests/conftest.py @@ -55,11 +55,6 @@ def testserver(): yield terminate_server_process(server) -# Ignore collection of async tests for Python 2 -collect_ignore = [] -if sys.version_info < (3,5): - collect_ignore.append("asynctests") - @pytest.fixture def credential(): class FakeCredential: diff --git a/test/vanilla/legacy/AcceptanceTests/conftest.py b/test/vanilla/legacy/AcceptanceTests/conftest.py index fc5d3764a08..5c0e3d8fb37 100644 --- a/test/vanilla/legacy/AcceptanceTests/conftest.py +++ b/test/vanilla/legacy/AcceptanceTests/conftest.py @@ -63,12 +63,6 @@ def testserver(): yield terminate_server_process(server) -# Ignore collection of async tests for Python 2 -collect_ignore = [] -if sys.version_info < (3,5): - collect_ignore.append("asynctests") - - class CookiePolicy(SansIOHTTPPolicy): def __init__(self, *args, **kwargs): self._current_cookie = None diff --git a/test/vanilla/legacy/AcceptanceTests/test_additional_properties.py b/test/vanilla/legacy/AcceptanceTests/test_additional_properties.py index 81a3684ab75..68a5619c86c 100644 --- a/test/vanilla/legacy/AcceptanceTests/test_additional_properties.py +++ b/test/vanilla/legacy/AcceptanceTests/test_additional_properties.py @@ -150,13 +150,8 @@ def test_create_ap_in_properties_with_ap_string(self, client): def test_models(self): from additionalproperties.models import Error - - if sys.version_info >= (3,5): - from additionalproperties.models._models_py3 import Error as ErrorPy3 - assert Error == ErrorPy3 - else: - from additionalproperties.models._models import Error as ErrorPy2 - assert Error == ErrorPy2 + from additionalproperties.models._models_py3 import Error as ErrorPy3 + assert Error == ErrorPy3 def test_operation_groups(self): from additionalproperties.operations import PetsOperations diff --git a/test/vanilla/legacy/AcceptanceTests/test_array.py b/test/vanilla/legacy/AcceptanceTests/test_array.py index 02b3f532523..3c11141c90d 100644 --- a/test/vanilla/legacy/AcceptanceTests/test_array.py +++ b/test/vanilla/legacy/AcceptanceTests/test_array.py @@ -284,18 +284,14 @@ def test_array_string_enum_valid(self, client): def test_models(self): from bodyarray.models import Error - if sys.version_info >= (3,5): - from bodyarray.models._models_py3 import Error as ErrorPy3 - assert Error == ErrorPy3 - else: - from bodyarray.models._models import Error as ErrorPy2 - assert Error == ErrorPy2 + from bodyarray.models._models_py3 import Error as ErrorPy3 + assert Error == ErrorPy3 def test_operation_groups(self): from bodyarray.operations import ArrayOperations with pytest.raises(ImportError): from bodyarray.operations import _array_operations_py3 - + from bodyarray.operations._array_operations import ArrayOperations as ArrayOperationsPy2 assert ArrayOperations == ArrayOperationsPy2 \ No newline at end of file diff --git a/test/vanilla/legacy/AcceptanceTests/test_bool.py b/test/vanilla/legacy/AcceptanceTests/test_bool.py index ca05b656239..3e1456a3043 100644 --- a/test/vanilla/legacy/AcceptanceTests/test_bool.py +++ b/test/vanilla/legacy/AcceptanceTests/test_bool.py @@ -69,12 +69,8 @@ def test_model_get_invalid(self, client): def test_models(self): from bodyboolean.models import Error - if sys.version_info >= (3,5): - from bodyboolean.models._models_py3 import Error as ErrorPy3 - assert Error == ErrorPy3 - else: - from bodyboolean.models._models import Error as ErrorPy2 - assert Error == ErrorPy2 + from bodyboolean.models._models_py3 import Error as ErrorPy3 + assert Error == ErrorPy3 def test_operation_groups(self): from bodyboolean.operations import BoolOperations diff --git a/test/vanilla/legacy/AcceptanceTests/test_byte.py b/test/vanilla/legacy/AcceptanceTests/test_byte.py index 9d16f7ac23d..ccae578a701 100644 --- a/test/vanilla/legacy/AcceptanceTests/test_byte.py +++ b/test/vanilla/legacy/AcceptanceTests/test_byte.py @@ -65,18 +65,14 @@ def test_get_invalid(self, client): def test_models(self): from bodybyte.models import Error - if sys.version_info >= (3,5): - from bodybyte.models._models_py3 import Error as ErrorPy3 - assert Error == ErrorPy3 - else: - from bodybyte.models._models import Error as ErrorPy2 - assert Error == ErrorPy2 + from bodybyte.models._models_py3 import Error as ErrorPy3 + assert Error == ErrorPy3 def test_operation_groups(self): from bodybyte.operations import ByteOperations with pytest.raises(ImportError): from bodybyte.operations import _byte_operations_py3 - + from bodybyte.operations._byte_operations import ByteOperations as ByteOperationsPy2 assert ByteOperations == ByteOperationsPy2 diff --git a/test/vanilla/legacy/AcceptanceTests/test_complex.py b/test/vanilla/legacy/AcceptanceTests/test_complex.py index 760de71843a..414b493d52b 100644 --- a/test/vanilla/legacy/AcceptanceTests/test_complex.py +++ b/test/vanilla/legacy/AcceptanceTests/test_complex.py @@ -464,12 +464,8 @@ def test_polymorphism_get_and_put_missing_discriminator(self, client): def test_models(self): from bodycomplex.models import Error - if sys.version_info >= (3,5): - from bodycomplex.models._models_py3 import Error as ErrorPy3 - assert Error == ErrorPy3 - else: - from bodycomplex.models._models import Error as ErrorPy2 - assert Error == ErrorPy2 + from bodycomplex.models._models_py3 import Error as ErrorPy3 + assert Error == ErrorPy3 def test_operation_groups(self): from bodycomplex.operations import PolymorphicrecursiveOperations diff --git a/test/vanilla/legacy/AcceptanceTests/test_custom_base_uri.py b/test/vanilla/legacy/AcceptanceTests/test_custom_base_uri.py index e71a23571cb..b4c6732c60e 100644 --- a/test/vanilla/legacy/AcceptanceTests/test_custom_base_uri.py +++ b/test/vanilla/legacy/AcceptanceTests/test_custom_base_uri.py @@ -76,12 +76,8 @@ def test_more_options(self): def test_models(self): from custombaseurl.models import Error - if sys.version_info >= (3,5): - from custombaseurl.models._models_py3 import Error as ErrorPy3 - assert Error == ErrorPy3 - else: - from custombaseurl.models._models import Error as ErrorPy2 - assert Error == ErrorPy2 + from custombaseurl.models._models_py3 import Error as ErrorPy3 + assert Error == ErrorPy3 def test_operation_groups(self): from custombaseurl.operations import PathsOperations diff --git a/test/vanilla/legacy/AcceptanceTests/test_date.py b/test/vanilla/legacy/AcceptanceTests/test_date.py index a6c79cbf648..25cf5e6ea0c 100644 --- a/test/vanilla/legacy/AcceptanceTests/test_date.py +++ b/test/vanilla/legacy/AcceptanceTests/test_date.py @@ -75,12 +75,8 @@ def test_model_get_underflow_date(self, client): def test_models(self): from bodydate.models import Error - if sys.version_info >= (3,5): - from bodydate.models._models_py3 import Error as ErrorPy3 - assert Error == ErrorPy3 - else: - from bodydate.models._models import Error as ErrorPy2 - assert Error == ErrorPy2 + from bodydate.models._models_py3 import Error as ErrorPy3 + assert Error == ErrorPy3 def test_operation_groups(self): from bodydate.operations import DateOperations diff --git a/test/vanilla/legacy/AcceptanceTests/test_datetime.py b/test/vanilla/legacy/AcceptanceTests/test_datetime.py index ea52172a99c..57fe5ac1af3 100644 --- a/test/vanilla/legacy/AcceptanceTests/test_datetime.py +++ b/test/vanilla/legacy/AcceptanceTests/test_datetime.py @@ -124,12 +124,8 @@ def test_put_local_negative_offset_max_date_time(self, client): def test_models(self): from bodydatetime.models import Error - if sys.version_info >= (3,5): - from bodydatetime.models._models_py3 import Error as ErrorPy3 - assert Error == ErrorPy3 - else: - from bodydatetime.models._models import Error as ErrorPy2 - assert Error == ErrorPy2 + from bodydatetime.models._models_py3 import Error as ErrorPy3 + assert Error == ErrorPy3 def test_operation_groups(self): from bodydatetime.operations import DatetimeOperations diff --git a/test/vanilla/legacy/AcceptanceTests/test_datetime_rfc.py b/test/vanilla/legacy/AcceptanceTests/test_datetime_rfc.py index 0b55f3fd5fd..9dbc6528abd 100644 --- a/test/vanilla/legacy/AcceptanceTests/test_datetime_rfc.py +++ b/test/vanilla/legacy/AcceptanceTests/test_datetime_rfc.py @@ -77,12 +77,8 @@ def test_utc_min_date_time(self, client): def test_models(self): from bodydatetimerfc1123.models import Error - if sys.version_info >= (3,5): - from bodydatetimerfc1123.models._models_py3 import Error as ErrorPy3 - assert Error == ErrorPy3 - else: - from bodydatetimerfc1123.models._models import Error as ErrorPy2 - assert Error == ErrorPy2 + from bodydatetimerfc1123.models._models_py3 import Error as ErrorPy3 + assert Error == ErrorPy3 def test_operation_groups(self): from bodydatetimerfc1123.operations import Datetimerfc1123Operations diff --git a/test/vanilla/legacy/AcceptanceTests/test_dictionary.py b/test/vanilla/legacy/AcceptanceTests/test_dictionary.py index 6404e86f54c..c6532621804 100644 --- a/test/vanilla/legacy/AcceptanceTests/test_dictionary.py +++ b/test/vanilla/legacy/AcceptanceTests/test_dictionary.py @@ -308,12 +308,8 @@ def test_get_dictionary_item_null_and_empty(self, client): def test_models(self): from bodydictionary.models import Error - if sys.version_info >= (3,5): - from bodydictionary.models._models_py3 import Error as ErrorPy3 - assert Error == ErrorPy3 - else: - from bodydictionary.models._models import Error as ErrorPy2 - assert Error == ErrorPy2 + from bodydictionary.models._models_py3 import Error as ErrorPy3 + assert Error == ErrorPy3 def test_operation_groups(self): from bodydictionary.operations import DictionaryOperations diff --git a/test/vanilla/legacy/AcceptanceTests/test_duration.py b/test/vanilla/legacy/AcceptanceTests/test_duration.py index bd7e238371d..5aa3a64c28a 100644 --- a/test/vanilla/legacy/AcceptanceTests/test_duration.py +++ b/test/vanilla/legacy/AcceptanceTests/test_duration.py @@ -60,12 +60,8 @@ def test_positive_duration(self, client): def test_models(self): from bodyduration.models import Error - if sys.version_info >= (3,5): - from bodyduration.models._models_py3 import Error as ErrorPy3 - assert Error == ErrorPy3 - else: - from bodyduration.models._models import Error as ErrorPy2 - assert Error == ErrorPy2 + from bodyduration.models._models_py3 import Error as ErrorPy3 + assert Error == ErrorPy3 def test_operation_groups(self): from bodyduration.operations import DurationOperations diff --git a/test/vanilla/legacy/AcceptanceTests/test_extensible_enums.py b/test/vanilla/legacy/AcceptanceTests/test_extensible_enums.py index a2f513d0e7c..aecbb573c89 100644 --- a/test/vanilla/legacy/AcceptanceTests/test_extensible_enums.py +++ b/test/vanilla/legacy/AcceptanceTests/test_extensible_enums.py @@ -76,12 +76,8 @@ def test_add_pet(self, client): def test_models(self): from extensibleenumsswagger.models import Pet - if sys.version_info >= (3,5): - from extensibleenumsswagger.models._models_py3 import Pet as PetPy3 - assert Pet == PetPy3 - else: - from extensibleenumsswagger.models._models import Pet as PetPy2 - assert Pet == PetPy2 + from extensibleenumsswagger.models._models_py3 import Pet as PetPy3 + assert Pet == PetPy3 def test_operation_groups(self): from extensibleenumsswagger.operations import PetOperations diff --git a/test/vanilla/legacy/AcceptanceTests/test_file.py b/test/vanilla/legacy/AcceptanceTests/test_file.py index f95d7157074..9c6e7b151a9 100644 --- a/test/vanilla/legacy/AcceptanceTests/test_file.py +++ b/test/vanilla/legacy/AcceptanceTests/test_file.py @@ -141,12 +141,8 @@ def test_get_empty_file_with_callback(self, client, callback): def test_models(self): from bodyfile.models import Error - if sys.version_info >= (3,5): - from bodyfile.models._models_py3 import Error as ErrorPy3 - assert Error == ErrorPy3 - else: - from bodyfile.models._models import Error as ErrorPy2 - assert Error == ErrorPy2 + from bodyfile.models._models_py3 import Error as ErrorPy3 + assert Error == ErrorPy3 def test_operation_groups(self): from bodyfile.operations import FilesOperations diff --git a/test/vanilla/legacy/AcceptanceTests/test_header.py b/test/vanilla/legacy/AcceptanceTests/test_header.py index 2525a131e43..c69f02c3606 100644 --- a/test/vanilla/legacy/AcceptanceTests/test_header.py +++ b/test/vanilla/legacy/AcceptanceTests/test_header.py @@ -199,12 +199,8 @@ def status_code(pipeline_response, _, headers): def test_models(self): from header.models import Error - if sys.version_info >= (3,5): - from header.models._models_py3 import Error as ErrorPy3 - assert Error == ErrorPy3 - else: - from header.models._models import Error as ErrorPy2 - assert Error == ErrorPy2 + from header.models._models_py3 import Error as ErrorPy3 + assert Error == ErrorPy3 def test_operation_groups(self): from header.operations import HeaderOperations diff --git a/test/vanilla/legacy/AcceptanceTests/test_http.py b/test/vanilla/legacy/AcceptanceTests/test_http.py index d83b3c4a7b4..64233814bd2 100644 --- a/test/vanilla/legacy/AcceptanceTests/test_http.py +++ b/test/vanilla/legacy/AcceptanceTests/test_http.py @@ -424,12 +424,8 @@ def test_empty_no_content(self, client): def test_models(self): from httpinfrastructure.models import Error - if sys.version_info >= (3,5): - from httpinfrastructure.models._models_py3 import Error as ErrorPy3 - assert Error == ErrorPy3 - else: - from httpinfrastructure.models._models import Error as ErrorPy2 - assert Error == ErrorPy2 + from httpinfrastructure.models._models_py3 import Error as ErrorPy3 + assert Error == ErrorPy3 def test_operation_groups(self): from httpinfrastructure.operations import MultipleResponsesOperations diff --git a/test/vanilla/legacy/AcceptanceTests/test_integer.py b/test/vanilla/legacy/AcceptanceTests/test_integer.py index e8f2eb8b0a8..9ab53b33154 100644 --- a/test/vanilla/legacy/AcceptanceTests/test_integer.py +++ b/test/vanilla/legacy/AcceptanceTests/test_integer.py @@ -84,12 +84,8 @@ def test_get_null_and_invalid_unix_time(self, client): def test_models(self): from bodyinteger.models import Error - if sys.version_info >= (3,5): - from bodyinteger.models._models_py3 import Error as ErrorPy3 - assert Error == ErrorPy3 - else: - from bodyinteger.models._models import Error as ErrorPy2 - assert Error == ErrorPy2 + from bodyinteger.models._models_py3 import Error as ErrorPy3 + assert Error == ErrorPy3 def test_operation_groups(self): from bodyinteger.operations import IntOperations diff --git a/test/vanilla/legacy/AcceptanceTests/test_media_types.py b/test/vanilla/legacy/AcceptanceTests/test_media_types.py index 591d7d0183d..74d2bd7691e 100644 --- a/test/vanilla/legacy/AcceptanceTests/test_media_types.py +++ b/test/vanilla/legacy/AcceptanceTests/test_media_types.py @@ -82,12 +82,8 @@ def test_binary_body_three_content_types(self, client): def test_models(self): from mediatypes.models import SourcePath - if sys.version_info >= (3,5): - from mediatypes.models._models_py3 import SourcePath as SourcePathPy3 - assert SourcePath == SourcePathPy3 - else: - from mediatypes.models._models import SourcePath as SourcePathPy2 - assert SourcePath == SourcePathPy2 + from mediatypes.models._models_py3 import SourcePath as SourcePathPy3 + assert SourcePath == SourcePathPy3 def test_operation_groups(self): from mediatypes.operations import MediaTypesClientOperationsMixin diff --git a/test/vanilla/legacy/AcceptanceTests/test_model_flattening.py b/test/vanilla/legacy/AcceptanceTests/test_model_flattening.py index f1d8ba97519..236f3b4920f 100644 --- a/test/vanilla/legacy/AcceptanceTests/test_model_flattening.py +++ b/test/vanilla/legacy/AcceptanceTests/test_model_flattening.py @@ -267,12 +267,8 @@ def test_model_flattening_with_grouping(self, client): def test_models(self): from modelflattening.models import Error - if sys.version_info >= (3,5): - from modelflattening.models._models_py3 import Error as ErrorPy3 - assert Error == ErrorPy3 - else: - from modelflattening.models._models import Error as ErrorPy2 - assert Error == ErrorPy2 + from modelflattening.models._models_py3 import Error as ErrorPy3 + assert Error == ErrorPy3 def test_operation_groups(self): from modelflattening.operations import AutoRestResourceFlatteningTestServiceOperationsMixin diff --git a/test/vanilla/legacy/AcceptanceTests/test_multiple_inheritance.py b/test/vanilla/legacy/AcceptanceTests/test_multiple_inheritance.py index 39d2a334696..da8f176868e 100644 --- a/test/vanilla/legacy/AcceptanceTests/test_multiple_inheritance.py +++ b/test/vanilla/legacy/AcceptanceTests/test_multiple_inheritance.py @@ -76,12 +76,8 @@ def test_put_kitten(self, client): def test_models(self): from multipleinheritance.models import Error - if sys.version_info >= (3,5): - from multipleinheritance.models._models_py3 import Error as ErrorPy3 - assert Error == ErrorPy3 - else: - from multipleinheritance.models._models import Error as ErrorPy2 - assert Error == ErrorPy2 + from multipleinheritance.models._models_py3 import Error as ErrorPy3 + assert Error == ErrorPy3 def test_operation_groups(self): from multipleinheritance.operations import MultipleInheritanceServiceClientOperationsMixin diff --git a/test/vanilla/legacy/AcceptanceTests/test_no_operations.py b/test/vanilla/legacy/AcceptanceTests/test_no_operations.py index af7e2172b70..64478b99bdc 100644 --- a/test/vanilla/legacy/AcceptanceTests/test_no_operations.py +++ b/test/vanilla/legacy/AcceptanceTests/test_no_operations.py @@ -31,12 +31,8 @@ class TestNoOperations: def test_models(self): from nooperations.models import Error - if sys.version_info >= (3,5): - from nooperations.models._models_py3 import Error as ErrorPy3 - assert Error == ErrorPy3 - else: - from nooperations.models._models import Error as ErrorPy2 - assert Error == ErrorPy2 + from nooperations.models._models_py3 import Error as ErrorPy3 + assert Error == ErrorPy3 def test_operation_groups(self): with pytest.raises(ImportError): diff --git a/test/vanilla/legacy/AcceptanceTests/test_number.py b/test/vanilla/legacy/AcceptanceTests/test_number.py index 2dce600bbb6..8867bdb7ade 100644 --- a/test/vanilla/legacy/AcceptanceTests/test_number.py +++ b/test/vanilla/legacy/AcceptanceTests/test_number.py @@ -107,12 +107,8 @@ def test_get_invalid_float(self, client): def test_models(self): from bodynumber.models import Error - if sys.version_info >= (3,5): - from bodynumber.models._models_py3 import Error as ErrorPy3 - assert Error == ErrorPy3 - else: - from bodynumber.models._models import Error as ErrorPy2 - assert Error == ErrorPy2 + from bodynumber.models._models_py3 import Error as ErrorPy3 + assert Error == ErrorPy3 def test_operation_groups(self): from bodynumber.operations import NumberOperations diff --git a/test/vanilla/legacy/AcceptanceTests/test_python3_only.py b/test/vanilla/legacy/AcceptanceTests/test_python3_only.py index 142e665c142..bb7be7c9070 100644 --- a/test/vanilla/legacy/AcceptanceTests/test_python3_only.py +++ b/test/vanilla/legacy/AcceptanceTests/test_python3_only.py @@ -26,7 +26,6 @@ import sys import pytest -@pytest.mark.skipif(sys.version_info < (3, 0), reason="This is python3 only") def test_models(): from bodycomplexpython3only.models import Error from bodycomplexpython3only.models._models_py3 import Error as ErrorPy3 @@ -37,7 +36,6 @@ def test_models(): with pytest.raises(ImportError): from bodycomplexpython3only.models._models import Error -@pytest.mark.skipif(sys.version_info < (3, 0), reason="This is python3 only") def test_operation_groups(): from bodycomplexpython3only.operations import ArrayOperations from bodycomplexpython3only.operations._array_operations import ArrayOperations as ArrayOperationsPy3 diff --git a/test/vanilla/legacy/AcceptanceTests/test_required_optional.py b/test/vanilla/legacy/AcceptanceTests/test_required_optional.py index f64e3844775..82901a021df 100644 --- a/test/vanilla/legacy/AcceptanceTests/test_required_optional.py +++ b/test/vanilla/legacy/AcceptanceTests/test_required_optional.py @@ -130,12 +130,8 @@ def test_post_required_class(self, client): def test_models(self): from requiredoptional.models import Error - if sys.version_info >= (3,5): - from requiredoptional.models._models_py3 import Error as ErrorPy3 - assert Error == ErrorPy3 - else: - from requiredoptional.models._models import Error as ErrorPy2 - assert Error == ErrorPy2 + from requiredoptional.models._models_py3 import Error as ErrorPy3 + assert Error == ErrorPy3 def test_explict_put_optional_binary_body(self, client): client.explicit.put_optional_binary_body() diff --git a/test/vanilla/legacy/AcceptanceTests/test_string_tests.py b/test/vanilla/legacy/AcceptanceTests/test_string_tests.py index fe118493198..611c1a5e3d0 100644 --- a/test/vanilla/legacy/AcceptanceTests/test_string_tests.py +++ b/test/vanilla/legacy/AcceptanceTests/test_string_tests.py @@ -143,12 +143,8 @@ def test_lowercase_enum_retrieval(self): def test_models(self): from bodystring.models import Error - if sys.version_info >= (3,5): - from bodystring.models._models_py3 import Error as ErrorPy3 - assert Error == ErrorPy3 - else: - from bodystring.models._models import Error as ErrorPy2 - assert Error == ErrorPy2 + from bodystring.models._models_py3 import Error as ErrorPy3 + assert Error == ErrorPy3 def test_operation_groups(self): from bodystring.operations import EnumOperations diff --git a/test/vanilla/legacy/AcceptanceTests/test_time.py b/test/vanilla/legacy/AcceptanceTests/test_time.py index f17ded16af1..1d3174a682b 100644 --- a/test/vanilla/legacy/AcceptanceTests/test_time.py +++ b/test/vanilla/legacy/AcceptanceTests/test_time.py @@ -48,12 +48,8 @@ def test_put(self, client): def test_models(self): from bodytime.models import Error - if sys.version_info >= (3,5): - from bodytime.models._models_py3 import Error as ErrorPy3 - assert Error == ErrorPy3 - else: - from bodytime.models._models import Error as ErrorPy2 - assert Error == ErrorPy2 + from bodytime.models._models_py3 import Error as ErrorPy3 + assert Error == ErrorPy3 def test_operation_groups(self): from bodytime.operations import TimeOperations diff --git a/test/vanilla/legacy/AcceptanceTests/test_url.py b/test/vanilla/legacy/AcceptanceTests/test_url.py index 93666bd7787..62eabf3958f 100644 --- a/test/vanilla/legacy/AcceptanceTests/test_url.py +++ b/test/vanilla/legacy/AcceptanceTests/test_url.py @@ -242,12 +242,8 @@ def test_get_local_path_item_query_null(self, client): def test_models(self): from url.models import Error - if sys.version_info >= (3,5): - from url.models._models_py3 import Error as ErrorPy3 - assert Error == ErrorPy3 - else: - from url.models._models import Error as ErrorPy2 - assert Error == ErrorPy2 + from url.models._models_py3 import Error as ErrorPy3 + assert Error == ErrorPy3 def test_operation_groups(self): from url.operations import QueriesOperations diff --git a/test/vanilla/legacy/AcceptanceTests/test_validation.py b/test/vanilla/legacy/AcceptanceTests/test_validation.py index 396bcb6e0f8..b07f9261ae6 100644 --- a/test/vanilla/legacy/AcceptanceTests/test_validation.py +++ b/test/vanilla/legacy/AcceptanceTests/test_validation.py @@ -152,12 +152,8 @@ def test_api_version_validation(self, client): def test_models(self): from validation.models import Error - if sys.version_info >= (3,5): - from validation.models._models_py3 import Error as ErrorPy3 - assert Error == ErrorPy3 - else: - from validation.models._models import Error as ErrorPy2 - assert Error == ErrorPy2 + from validation.models._models_py3 import Error as ErrorPy3 + assert Error == ErrorPy3 def test_operation_groups(self): from validation.operations import AutoRestValidationTestOperationsMixin diff --git a/test/vanilla/legacy/AcceptanceTests/test_xml.py b/test/vanilla/legacy/AcceptanceTests/test_xml.py index ef18ae75132..e2443e5fb9b 100644 --- a/test/vanilla/legacy/AcceptanceTests/test_xml.py +++ b/test/vanilla/legacy/AcceptanceTests/test_xml.py @@ -177,12 +177,8 @@ def test_acls(self, client): def test_models(self): from xmlservice.models import Error - if sys.version_info >= (3,5): - from xmlservice.models._models_py3 import Error as ErrorPy3 - assert Error == ErrorPy3 - else: - from xmlservice.models._models import Error as ErrorPy2 - assert Error == ErrorPy2 + from xmlservice.models._models_py3 import Error as ErrorPy3 + assert Error == ErrorPy3 def test_xms_text(self, client): xml_object = client.xml.get_xms_text() diff --git a/test/vanilla/legacy/AcceptanceTests/test_xms_error.py b/test/vanilla/legacy/AcceptanceTests/test_xms_error.py index 9892515b696..2d0ffcb20a0 100644 --- a/test/vanilla/legacy/AcceptanceTests/test_xms_error.py +++ b/test/vanilla/legacy/AcceptanceTests/test_xms_error.py @@ -129,12 +129,8 @@ def read(self): def test_models(self): from xmserrorresponse.models import Animal - if sys.version_info >= (3,5): - from xmserrorresponse.models._models_py3 import Animal as AnimalPy3 - assert Animal == AnimalPy3 - else: - from xmserrorresponse.models._models import Animal as AnimalPy2 - assert Animal == AnimalPy2 + from xmserrorresponse.models._models_py3 import Animal as AnimalPy3 + assert Animal == AnimalPy3 def test_operation_groups(self): from xmserrorresponse.operations import PetOperations diff --git a/test/vanilla/low-level/AcceptanceTests/conftest.py b/test/vanilla/low-level/AcceptanceTests/conftest.py index fc90a7cb2a5..57d0b09507c 100644 --- a/test/vanilla/low-level/AcceptanceTests/conftest.py +++ b/test/vanilla/low-level/AcceptanceTests/conftest.py @@ -64,11 +64,6 @@ def testserver(): yield terminate_server_process(server) -# Ignore collection of async tests for Python 2 -collect_ignore = [] -if sys.version_info < (3,5): - collect_ignore.append("asynctests") - @pytest.fixture() def base_send_request(): def send_request(client, request): diff --git a/test/vanilla/low-level/AcceptanceTests/test_content_type.py b/test/vanilla/low-level/AcceptanceTests/test_content_type.py index 7f6fd4e52a3..e96d9af7bbb 100644 --- a/test/vanilla/low-level/AcceptanceTests/test_content_type.py +++ b/test/vanilla/low-level/AcceptanceTests/test_content_type.py @@ -49,7 +49,6 @@ def test_string_body_content_type_kwarg(): request = build_analyze_body_request(content="hello", content_type="text/plain") assert request.headers["Content-Type"] == "text/plain" -@pytest.mark.skipif(sys.version_info < (3, 0), reason="bytes are strings in 2.7") def test_io_body_no_content_type_kwarg(): request = build_analyze_body_request(content=b"PDF") assert not request.headers.get("Content-Type") diff --git a/test/vanilla/low-level/AcceptanceTests/test_form_data.py b/test/vanilla/low-level/AcceptanceTests/test_form_data.py index 14ae3d9b231..9237b39d295 100644 --- a/test/vanilla/low-level/AcceptanceTests/test_form_data.py +++ b/test/vanilla/low-level/AcceptanceTests/test_form_data.py @@ -76,7 +76,6 @@ def test_file_upload_stream(client): result.write(data) assert result.getvalue().decode() == test_string -@pytest.mark.skipif(sys.version_info < (3, 0), reason="our copying of the request is closing the file in 2.7") def test_file_upload_file_stream(client, dummy_file): name = os.path.basename(dummy_file) @@ -93,8 +92,6 @@ def test_file_upload_file_stream(client, dummy_file): result.write(data) assert result.getvalue().decode() == "Test file" - -@pytest.mark.skipif(sys.version_info < (3, 0), reason="our copying of the request is closing the file in 2.7") def test_file_body_upload(client, dummy_file): test_string = "Upload file test case" diff --git a/test/vanilla/version-tolerant/AcceptanceTests/conftest.py b/test/vanilla/version-tolerant/AcceptanceTests/conftest.py index fc5d3764a08..719e29f5311 100644 --- a/test/vanilla/version-tolerant/AcceptanceTests/conftest.py +++ b/test/vanilla/version-tolerant/AcceptanceTests/conftest.py @@ -63,11 +63,6 @@ def testserver(): yield terminate_server_process(server) -# Ignore collection of async tests for Python 2 -collect_ignore = [] -if sys.version_info < (3,5): - collect_ignore.append("asynctests") - class CookiePolicy(SansIOHTTPPolicy): def __init__(self, *args, **kwargs): diff --git a/test/vanilla/version-tolerant/AcceptanceTests/test_python3_only.py b/test/vanilla/version-tolerant/AcceptanceTests/test_python3_only.py index d8b41aa74a2..0f1f818e714 100644 --- a/test/vanilla/version-tolerant/AcceptanceTests/test_python3_only.py +++ b/test/vanilla/version-tolerant/AcceptanceTests/test_python3_only.py @@ -26,7 +26,6 @@ import sys import pytest -@pytest.mark.skipif(sys.version_info < (3, 0), reason="This is python3 only") def test_operation_groups(): from bodycomplexpython3only.operations import ArrayOperations from bodycomplexpython3only.operations._operations import ArrayOperations as ArrayOperationsPy3