Skip to content

Commit 435af83

Browse files
fix(tests): Correct driver name comments & xfail.
1 parent 1fd8ac5 commit 435af83

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

tests/core/test_connection_config.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1464,7 +1464,7 @@ def test_mssql_engine_import_validator():
14641464
mock_import.side_effect = ImportError("No module named 'pyodbc'")
14651465
MSSQLConnectionConfig(host="localhost", driver="pyodbc")
14661466

1467-
# Test PyODBC driver suggests mssql-python extra when import fails
1467+
# Test MSSQL Python driver suggests mssql-python extra when import fails
14681468
if SUPPORTS_MSSQL_PYTHON_DRIVER:
14691469
with pytest.raises(ConfigError, match=r"pip install \"sqlmesh\[mssql-python\]\""):
14701470
with patch("importlib.import_module") as mock_import:
@@ -1684,7 +1684,6 @@ def test_mssql_pyodbc_connection_string_generation():
16841684
assert call_args[1]["autocommit"] is False
16851685

16861686

1687-
@pytest.mark.xfail(not SUPPORTS_MSSQL_PYTHON_DRIVER, reason="mssql-python driver not supported")
16881687
def test_mssql_pyodbc_connection_string_with_odbc_properties():
16891688
"""Test pyodbc connection string includes custom ODBC properties."""
16901689
with patch("pyodbc.connect") as mock_pyodbc_connect:
@@ -1775,7 +1774,7 @@ def test_mssql_mssql_python_connection_string_generation():
17751774
factory_with_kwargs = config._connection_factory_with_kwargs
17761775
connection = factory_with_kwargs()
17771776

1778-
# Verify pyodbc.connect was called with the correct connection string
1777+
# Verify mssql_python.connect was called with the correct connection string
17791778
mock_mssql_python_connect.assert_called_once()
17801779
call_args = mock_mssql_python_connect.call_args
17811780

@@ -1823,7 +1822,7 @@ def test_mssql_mssql_python_connection_string_with_odbc_properties():
18231822
factory_with_kwargs = config._connection_factory_with_kwargs
18241823
connection = factory_with_kwargs()
18251824

1826-
# Verify pyodbc.connect was called
1825+
# Verify mssql_python.connect was called
18271826
mock_mssql_python_connect.assert_called_once()
18281827
conn_str = mock_mssql_python_connect.call_args[0][0]
18291828

@@ -2032,7 +2031,7 @@ def test_mssql_mssql_python_connection_datetimeoffset_handling():
20322031
def mock_add_output_converter(sql_type, converter_func):
20332032
converter_calls.append((sql_type, converter_func))
20342033

2035-
# Create a mock connection that will be returned by pyodbc.connect
2034+
# Create a mock connection that will be returned by mssql_python.connect
20362035
mock_connection = Mock()
20372036
mock_connection.add_output_converter = mock_add_output_converter
20382037
mock_mssql_python_connect.return_value = mock_connection
@@ -2288,7 +2287,7 @@ def test_fabric_mssql_python_connection_string_generation():
22882287
factory_with_kwargs = config._connection_factory_with_kwargs
22892288
connection = factory_with_kwargs()
22902289

2291-
# Verify pyodbc.connect was called with the correct connection string
2290+
# Verify mssql_python.connect was called with the correct connection string
22922291
mock_mssql_python_connect.assert_called_once()
22932292
call_args = mock_mssql_python_connect.call_args
22942293

0 commit comments

Comments
 (0)