Skip to content

Commit 0a05455

Browse files
committed
add log to debug catchwarnings issue
1 parent 50ca919 commit 0a05455

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/integ/test_connection.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616

1717
import pytest
1818

19+
logger = logging.getLogger(__name__)
20+
1921
import snowflake.connector
2022
from snowflake.connector import DatabaseError, OperationalError, ProgrammingError
2123
from snowflake.connector.connection import (
@@ -878,6 +880,9 @@ def test_invalid_connection_parameter(db_parameters, name, value, exc_warn):
878880
try:
879881
conn = snowflake.connector.connect(**conn_params)
880882
assert getattr(conn, "_" + name) == value
883+
for warning in w:
884+
logger.warning(warning.category)
885+
logger.warning(warning.message)
881886
assert len(w) == 1
882887
assert str(w[0].message) == str(exc_warn)
883888
finally:

0 commit comments

Comments
 (0)