You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by el...@apache.org on 2022/07/21 13:05:01 UTC

[airflow] branch main updated: make MsSQL tests runnable on Python 3.8 (2nd) (#25216)

This is an automated email from the ASF dual-hosted git repository.

eladkal pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 74e624b68b make MsSQL tests runnable on Python 3.8 (2nd) (#25216)
74e624b68b is described below

commit 74e624b68b08f49760bc70bb5a216dcecf249c44
Author: eladkal <45...@users.noreply.github.com>
AuthorDate: Thu Jul 21 16:04:52 2022 +0300

    make MsSQL tests runnable on Python 3.8 (2nd) (#25216)
    
    I missed the hive provider from the commit in https://github.com/apache/airflow/pull/25214
---
 .../apache/hive/transfers/test_mssql_to_hive.py          | 16 ++--------------
 1 file changed, 2 insertions(+), 14 deletions(-)

diff --git a/tests/providers/apache/hive/transfers/test_mssql_to_hive.py b/tests/providers/apache/hive/transfers/test_mssql_to_hive.py
index cfab662f35..8fae259a35 100644
--- a/tests/providers/apache/hive/transfers/test_mssql_to_hive.py
+++ b/tests/providers/apache/hive/transfers/test_mssql_to_hive.py
@@ -21,23 +21,11 @@ import unittest
 from collections import OrderedDict
 from unittest.mock import Mock, PropertyMock, patch
 
-import pytest
+import pymssql
 
-from airflow import PY38
+from airflow.providers.apache.hive.transfers.mssql_to_hive import MsSqlToHiveOperator
 
-if PY38:
-    MsSqlToHiveTransferOperator: None = None
-else:
-    from airflow.providers.apache.hive.transfers.mssql_to_hive import MsSqlToHiveOperator
 
-try:
-    import pymssql
-except ImportError:
-    pymssql = None
-
-
-@pytest.mark.skipif(PY38, reason="Mssql package not available when Python >= 3.8.")
-@pytest.mark.skipif(pymssql is None, reason='pymssql package not present')
 class TestMsSqlToHiveTransfer(unittest.TestCase):
     def setUp(self):
         self.kwargs = dict(sql='sql', hive_table='table', task_id='test_mssql_to_hive', dag=None)