File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -210,7 +210,11 @@ def create_connect_args(self, url):
210
210
raise sa_exc .ArgumentError (
211
211
f"Invalid name space is specified: { opts ['database' ]} "
212
212
)
213
- if ".snowflakecomputing.com" not in opts ["host" ] and not opts .get ("port" ):
213
+ if (
214
+ "host" in opts
215
+ and ".snowflakecomputing.com" not in opts ["host" ]
216
+ and not opts .get ("port" )
217
+ ):
214
218
opts ["account" ] = opts ["host" ]
215
219
if "." in opts ["account" ]:
216
220
# remove region subdomain
Original file line number Diff line number Diff line change @@ -173,6 +173,17 @@ def test_connect_args():
173
173
engine .dispose ()
174
174
175
175
176
+ def test_create_dialect ():
177
+ """
178
+ Tests getting only dialect object through create_engine
179
+ """
180
+ engine = create_engine ("snowflake://" )
181
+ try :
182
+ assert engine .dialect
183
+ finally :
184
+ engine .dispose ()
185
+
186
+
176
187
def test_simple_sql (engine_testaccount ):
177
188
"""
178
189
Simple SQL by SQLAlchemy
You can’t perform that action at this time.
0 commit comments