Skip to content

Commit ef0e310

Browse files
committed
Cover Dolt driver recheck after identity
1 parent cd09b62 commit ef0e310

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

‎tests/test_sql_profiles.py‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -617,3 +617,20 @@ def connect(self):
617617
assert yielded is connection
618618

619619
assert connection.rollback_called is True
620+
621+
def test_effective_profile_rechecks_driver_after_dolt_identity(monkeypatch) -> None:
622+
active = {
623+
"profile": "dolt",
624+
"raw_product_version": "2.2.3",
625+
}
626+
monkeypatch.setattr(
627+
capabilities, "active_connection", lambda _url, **_kwargs: active,
628+
)
629+
630+
with pytest.raises(
631+
UnsupportedOperationError,
632+
match=r"Dolt requires an explicit mysql\+pymysql URL",
633+
):
634+
effective_profile(
635+
"mariadb+mariadbconnector://user@host/database",
636+
)

0 commit comments

Comments
 (0)