Skip to content

Commit 3b68d0f

Browse files
committed
Refractore
1 parent e50af5c commit 3b68d0f

5 files changed

+12
-4
lines changed

tests/unit/test_arrow_queue.py

+2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
import unittest
22
import pytest
3+
34
try:
45
import pyarrow as pa
56
except ImportError:
67
pa = None
78
from databricks.sql.utils import ArrowQueue
89

10+
911
@pytest.mark.skipif(pa is None, reason="PyArrow is not installed")
1012
class ArrowQueueSuite(unittest.TestCase):
1113
@staticmethod

tests/unit/test_cloud_fetch_queue.py

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import databricks.sql.utils as utils
1111
from databricks.sql.types import SSLOptions
1212

13+
1314
@pytest.mark.skipif(pyarrow is None, reason="PyArrow is not installed")
1415
class CloudFetchQueueSuite(unittest.TestCase):
1516
def create_result_link(

tests/unit/test_fetches.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@
55
try:
66
import pyarrow as pa
77
except ImportError:
8-
pa=None
8+
pa = None
99

1010
import databricks.sql.client as client
1111
from databricks.sql.utils import ExecuteResponse, ArrowQueue
1212

13+
1314
@pytest.mark.skipif(pa is None, reason="PyArrow is not installed")
1415
class FetchTests(unittest.TestCase):
1516
"""

tests/unit/test_fetches_bench.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
import unittest
22
from unittest.mock import Mock
3+
34
try:
45
import pyarrow as pa
56
except ImportError:
6-
pa=None
7+
pa = None
78
import uuid
89
import time
910
import pytest
1011

1112
import databricks.sql.client as client
1213
from databricks.sql.utils import ExecuteResponse, ArrowQueue
1314

15+
1416
@pytest.mark.skipif(pa is None, reason="PyArrow is not installed")
1517
class FetchBenchmarkTests(unittest.TestCase):
1618
"""

tests/unit/test_thrift_backend.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,11 @@
66
from unittest.mock import patch, MagicMock, Mock
77
from ssl import CERT_NONE, CERT_REQUIRED
88
from urllib3 import HTTPSConnectionPool
9+
910
try:
1011
import pyarrow
1112
except ImportError:
12-
pyarrow=None
13+
pyarrow = None
1314
import databricks.sql
1415
from databricks.sql import utils
1516
from databricks.sql.types import SSLOptions
@@ -28,7 +29,8 @@ def retry_policy_factory():
2829
"_retry_delay_default": (float, 5, 1, 60),
2930
}
3031

31-
@pytest.mark.skipif(pyarrow is None,reason="PyArrow is not installed")
32+
33+
@pytest.mark.skipif(pyarrow is None, reason="PyArrow is not installed")
3234
class ThriftBackendTestSuite(unittest.TestCase):
3335
okay_status = ttypes.TStatus(statusCode=ttypes.TStatusCode.SUCCESS_STATUS)
3436

0 commit comments

Comments
 (0)