@@ -1770,50 +1770,3 @@ def test_fabric_pyodbc_connection_string_generation():
17701770
17711771 # Check autocommit parameter, should default to True for Fabric
17721772 assert call_args [1 ]["autocommit" ] is True
1773-
1774-
1775- def test_mssql_driver_defaults (make_config ):
1776- """Test driver defaults for MSSQL connection config.
1777-
1778- Ensures MSSQL defaults to 'pymssql' but can be overridden to 'pyodbc'.
1779- """
1780-
1781- # Test 1: MSSQL with no driver specified - should default to pymssql
1782- config_no_driver = make_config (type = "mssql" , host = "localhost" , check_import = False )
1783- assert isinstance (config_no_driver , MSSQLConnectionConfig )
1784- assert config_no_driver .driver == "pymssql"
1785-
1786- # Test 2: MSSQL with explicit pymssql driver
1787- config_pymssql = make_config (
1788- type = "mssql" , host = "localhost" , driver = "pymssql" , check_import = False
1789- )
1790- assert isinstance (config_pymssql , MSSQLConnectionConfig )
1791- assert config_pymssql .driver == "pymssql"
1792-
1793- # Test 3: MSSQL with explicit pyodbc driver
1794- config_pyodbc = make_config (type = "mssql" , host = "localhost" , driver = "pyodbc" , check_import = False )
1795- assert isinstance (config_pyodbc , MSSQLConnectionConfig )
1796- assert config_pyodbc .driver == "pyodbc"
1797-
1798-
1799- def test_fabric_driver_defaults (make_config ):
1800- """Test driver defaults for Fabric connection config.
1801-
1802- Ensures Fabric defaults to 'pyodbc' and cannot be changed to 'pymssql'.
1803- """
1804-
1805- # Test 1: Fabric with no driver specified - should default to pyodbc
1806- config_no_driver = make_config (type = "fabric" , host = "localhost" , check_import = False )
1807- assert isinstance (config_no_driver , FabricConnectionConfig )
1808- assert config_no_driver .driver == "pyodbc"
1809-
1810- # Test 2: Fabric with explicit pyodbc driver
1811- config_pyodbc = make_config (
1812- type = "fabric" , host = "localhost" , driver = "pyodbc" , check_import = False
1813- )
1814- assert isinstance (config_pyodbc , FabricConnectionConfig )
1815- assert config_pyodbc .driver == "pyodbc"
1816-
1817- # Test 3: Fabric with pymssql driver should fail (not allowed)
1818- with pytest .raises (ConfigError , match = r"Input should be 'pyodbc'" ):
1819- make_config (type = "fabric" , host = "localhost" , driver = "pymssql" , check_import = False )
0 commit comments