Skip to content

Commit 10acb24

Browse files
committed
Formatting tests files using black formatter (after upgrading black in local)
1 parent de3c2e8 commit 10acb24

11 files changed

Lines changed: 484 additions & 968 deletions

tests/test_001_globals.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -389,8 +389,7 @@ def test_decimal_separator_with_db_operations(db_connection):
389389
try:
390390
# Create a test table with decimal values
391391
cursor = db_connection.cursor()
392-
cursor.execute(
393-
"""
392+
cursor.execute("""
394393
DROP TABLE IF EXISTS #decimal_separator_test;
395394
CREATE TABLE #decimal_separator_test (
396395
id INT,
@@ -401,8 +400,7 @@ def test_decimal_separator_with_db_operations(db_connection):
401400
(2, 678.90),
402401
(3, 0.01),
403402
(4, 999.99);
404-
"""
405-
)
403+
""")
406404
cursor.close()
407405

408406
# Test 1: Fetch with default separator
@@ -470,8 +468,7 @@ def test_decimal_separator_batch_operations(db_connection):
470468
try:
471469
# Create test data
472470
cursor = db_connection.cursor()
473-
cursor.execute(
474-
"""
471+
cursor.execute("""
475472
DROP TABLE IF EXISTS #decimal_batch_test;
476473
CREATE TABLE #decimal_batch_test (
477474
id INT,
@@ -482,8 +479,7 @@ def test_decimal_separator_batch_operations(db_connection):
482479
(1, 123.456, 12345.67890),
483480
(2, 0.001, 0.00001),
484481
(3, 999.999, 9999.99999);
485-
"""
486-
)
482+
""")
487483
cursor.close()
488484

489485
# Test 1: Fetch results with default separator

tests/test_003_connection.py

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -992,16 +992,14 @@ def test_execute_with_large_parameters(db_connection, conn_str):
992992
pytest.skip("Skipping for Azure SQL - large parameter tests may cause timeouts")
993993

994994
# Test with a temporary table for large data
995-
cursor = db_connection.execute(
996-
"""
995+
cursor = db_connection.execute("""
997996
DROP TABLE IF EXISTS #large_params_test;
998997
CREATE TABLE #large_params_test (
999998
id INT,
1000999
large_text NVARCHAR(MAX),
10011000
large_binary VARBINARY(MAX)
10021001
)
1003-
"""
1004-
)
1002+
""")
10051003
cursor.close()
10061004

10071005
try:
@@ -2126,12 +2124,10 @@ def test_timeout_long_query(db_connection):
21262124
while retry_count < max_retries:
21272125
start_time = time.perf_counter()
21282126
try:
2129-
cursor.execute(
2130-
"""
2127+
cursor.execute("""
21312128
SELECT COUNT(*) FROM sys.objects a, sys.objects b, sys.objects c
21322129
WHERE a.object_id = b.object_id * c.object_id
2133-
"""
2134-
)
2130+
""")
21352131
cursor.fetchall()
21362132
elapsed_time = time.perf_counter() - start_time
21372133
break # Success, exit retry loop

0 commit comments

Comments
 (0)