@@ -5307,6 +5307,8 @@ def test_empty_string_chunk(cursor, db_connection):
53075307
53085308
53095309def test_varcharmax_short (cursor , db_connection ):
5310+ """Test inserting and retrieving a small string well below any size thresholds.
5311+ # Verifies basic functionality for VARCHAR(MAX) with typical input size."""
53105312 try :
53115313 cursor .execute ("DROP TABLE IF EXISTS #pytest_varcharmax" )
53125314 cursor .execute ("CREATE TABLE #pytest_varcharmax (col VARCHAR(MAX))" )
@@ -5323,6 +5325,9 @@ def test_varcharmax_short(cursor, db_connection):
53235325
53245326
53255327def test_varcharmax_boundary (cursor , db_connection ):
5328+ """Test inserting and retrieving a string at the boundary size (8000 characters),
5329+ which is the largest size supported without switching to streaming or large object handling.
5330+ Ensures proper handling at this edge case."""
53265331 try :
53275332 cursor .execute ("DROP TABLE IF EXISTS #pytest_varcharmax" )
53285333 cursor .execute ("CREATE TABLE #pytest_varcharmax (col VARCHAR(MAX))" )
@@ -5339,6 +5344,9 @@ def test_varcharmax_boundary(cursor, db_connection):
53395344
53405345
53415346def test_varcharmax_streaming (cursor , db_connection ):
5347+ """Test inserting and retrieving a string just above the boundary size (8100 characters),
5348+ which requires streaming mechanisms to handle data efficiently.
5349+ Validates that larger data triggers correct processing without truncation."""
53425350 try :
53435351 cursor .execute ("DROP TABLE IF EXISTS #pytest_varcharmax" )
53445352 cursor .execute ("CREATE TABLE #pytest_varcharmax (col VARCHAR(MAX))" )
@@ -5355,6 +5363,8 @@ def test_varcharmax_streaming(cursor, db_connection):
53555363
53565364
53575365def test_varcharmax_large (cursor , db_connection ):
5366+ """Test inserting and retrieving a very large string (100,000 characters),
5367+ which is well beyond typical sizes and ensures that the system can handle large VARCHAR(MAX) values."""
53585368 try :
53595369 cursor .execute ("DROP TABLE IF EXISTS #pytest_varcharmax" )
53605370 cursor .execute ("CREATE TABLE #pytest_varcharmax (col VARCHAR(MAX))" )
@@ -5371,6 +5381,7 @@ def test_varcharmax_large(cursor, db_connection):
53715381
53725382
53735383def test_varcharmax_empty_string (cursor , db_connection ):
5384+ """Test inserting and retrieving an empty string to verify correct handling of zero-length data."""
53745385 try :
53755386 cursor .execute ("DROP TABLE IF EXISTS #pytest_varcharmax" )
53765387 cursor .execute ("CREATE TABLE #pytest_varcharmax (col VARCHAR(MAX))" )
@@ -5386,6 +5397,7 @@ def test_varcharmax_empty_string(cursor, db_connection):
53865397
53875398
53885399def test_varcharmax_null (cursor , db_connection ):
5400+ """Test inserting and retrieving a NULL value to ensure proper handling of SQL NULLs."""
53895401 try :
53905402 cursor .execute ("DROP TABLE IF EXISTS #pytest_varcharmax" )
53915403 cursor .execute ("CREATE TABLE #pytest_varcharmax (col VARCHAR(MAX))" )
@@ -5401,6 +5413,8 @@ def test_varcharmax_null(cursor, db_connection):
54015413
54025414
54035415def test_varcharmax_transaction_rollback (cursor , db_connection ):
5416+ """Test that inserting a large VARCHAR(MAX) within a transaction that is rolled back
5417+ does not persist the data, ensuring transactional integrity."""
54045418 try :
54055419 cursor .execute ("DROP TABLE IF EXISTS #pytest_varcharmax" )
54065420 cursor .execute ("CREATE TABLE #pytest_varcharmax (col VARCHAR(MAX))" )
0 commit comments