Skip to content

Commit e2b0dec

Browse files
committed
test(mssql): add test for empty password
1 parent 8b369a2 commit e2b0dec

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

ibis/backends/mssql/tests/test_client.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,3 +319,17 @@ def test_non_ascii_column_name(con):
319319
names = schema.names
320320
assert len(names) == 1
321321
assert names[0] == "калона"
322+
323+
324+
def test_mssql_without_password_is_valid():
325+
with pytest.raises(
326+
PyODBCProgrammingError, match=f"Login failed for user '{MSSQL_USER}'"
327+
):
328+
ibis.mssql.connect(
329+
user=MSSQL_USER,
330+
host=MSSQL_HOST,
331+
password=None,
332+
port=MSSQL_PORT,
333+
database=IBIS_TEST_MSSQL_DB,
334+
driver=MSSQL_PYODBC_DRIVER,
335+
)

0 commit comments

Comments
 (0)