2020# software solely pursuant to the terms of the relevant commercial agreement.
2121
2222import datetime
23+ import sys
2324from ipaddress import IPv4Address
2425from unittest import mock
2526
@@ -58,6 +59,9 @@ def test_cursor_fetch(mocked_connection):
5859 ]
5960
6061
62+ @pytest .mark .skipif (
63+ sys .version_info < (3 , 10 ), reason = "Test needs Python >= 3.10"
64+ )
6165def test_cursor_description (mocked_connection ):
6266 cursor = mocked_connection .cursor ()
6367 response = {
@@ -249,6 +253,9 @@ def test_execute_with_bulk_args(mocked_connection):
249253 mocked_connection .client .sql .assert_called_once_with (statement , None , [[1 ]])
250254
251255
256+ @pytest .mark .skipif (
257+ sys .version_info < (3 , 10 ), reason = "Converter needs Python >= 3.10"
258+ )
252259def test_execute_custom_converter (mocked_connection ):
253260 """
254261 Verify that a custom converter is correctly applied when passed to a cursor.
@@ -299,6 +306,9 @@ def test_execute_custom_converter(mocked_connection):
299306 ]
300307
301308
309+ @pytest .mark .skipif (
310+ sys .version_info < (3 , 10 ), reason = "Converter needs Python >= 3.10"
311+ )
302312def test_execute_with_converter_and_invalid_data_type (mocked_connection ):
303313 converter = DefaultTypeConverter ()
304314
@@ -323,6 +333,9 @@ def test_execute_with_converter_and_invalid_data_type(mocked_connection):
323333 assert e .exception .args == "999 is not a valid DataType"
324334
325335
336+ @pytest .mark .skipif (
337+ sys .version_info < (3 , 10 ), reason = "Converter needs Python >= 3.10"
338+ )
326339def test_execute_array_with_converter (mocked_connection ):
327340 converter = DefaultTypeConverter ()
328341 cursor = mocked_connection .cursor (converter = converter )
@@ -345,6 +358,9 @@ def test_execute_array_with_converter(mocked_connection):
345358 ]
346359
347360
361+ @pytest .mark .skipif (
362+ sys .version_info < (3 , 10 ), reason = "Converter needs Python >= 3.10"
363+ )
348364def test_execute_array_with_converter_invalid (mocked_connection ):
349365 converter = DefaultTypeConverter ()
350366 cursor = mocked_connection .cursor (converter = converter )
@@ -368,6 +384,9 @@ def test_execute_array_with_converter_invalid(mocked_connection):
368384 )
369385
370386
387+ @pytest .mark .skipif (
388+ sys .version_info < (3 , 10 ), reason = "Converter needs Python >= 3.10"
389+ )
371390def test_execute_nested_array_with_converter (mocked_connection ):
372391 converter = DefaultTypeConverter ()
373392 cursor = mocked_connection .cursor (converter = converter )
@@ -405,6 +424,9 @@ def test_execute_nested_array_with_converter(mocked_connection):
405424 ]
406425
407426
427+ @pytest .mark .skipif (
428+ sys .version_info < (3 , 10 ), reason = "Converter needs Python >= 3.10"
429+ )
408430def test_executemany_with_converter (mocked_connection ):
409431 converter = DefaultTypeConverter ()
410432 cursor = mocked_connection .cursor (converter = converter )
@@ -426,6 +448,9 @@ def test_executemany_with_converter(mocked_connection):
426448 assert result == []
427449
428450
451+ @pytest .mark .skipif (
452+ sys .version_info < (3 , 10 ), reason = "Converter needs Python >= 3.10"
453+ )
429454def test_execute_with_timezone (mocked_connection ):
430455 # Create a `Cursor` object with `time_zone`.
431456 tz_mst = datetime .timezone (datetime .timedelta (hours = 7 ), name = "MST" )
0 commit comments