@@ -49,16 +49,14 @@ def variant_test_table(cursor, db_connection):
4949 table_name = "#pytest_sql_variant"
5050 drop_table_if_exists (cursor , table_name )
5151
52- cursor .execute (
53- f"""
52+ cursor .execute (f"""
5453 CREATE TABLE { table_name } (
5554 id INT PRIMARY KEY,
5655 variant_col SQL_VARIANT,
5756 base_type NVARCHAR(50), -- What SQL type is stored in variant
5857 description NVARCHAR(100)
5958 )
60- """
61- )
59+ """ )
6260 db_connection .commit ()
6361
6462 # Insert test data with explicit CAST for each SQL base type
@@ -104,12 +102,10 @@ def variant_test_table(cursor, db_connection):
104102 ]
105103
106104 for row in test_data :
107- cursor .execute (
108- f"""
105+ cursor .execute (f"""
109106 INSERT INTO { table_name } (id, variant_col, base_type, description)
110107 VALUES ({ row [0 ]} , { row [1 ]} , '{ row [2 ]} ', '{ row [3 ]} ')
111- """
112- )
108+ """ )
113109
114110 # Also test implicit type conversion (what SQL Server chooses)
115111 cursor .execute (f"INSERT INTO { table_name } VALUES (20, 123, 'int', 'Implicit int literal')" )
@@ -500,14 +496,12 @@ def test_sql_variant_large_dataset(cursor, db_connection):
500496 table_name = "#pytest_sql_variant_large"
501497 drop_table_if_exists (cursor , table_name )
502498
503- cursor .execute (
504- f"""
499+ cursor .execute (f"""
505500 CREATE TABLE { table_name } (
506501 id INT PRIMARY KEY,
507502 variant_col SQL_VARIANT
508503 )
509- """
510- )
504+ """ )
511505 db_connection .commit ()
512506
513507 # Insert 100 rows with explicit CAST for each type
0 commit comments