MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_component_set

Method test_component_set

test/engine/test_parseconnect.py:308–323  ·  view source on GitHub ↗
(self, component)

Source from the content-addressed store, hash-verified

306 "database",
307 )
308 def test_component_set(self, component):
309 common_url = (
310 "dbtype://username:password"
311 "@[2001:da8:2004:1000:202:116:160:90]:80/database?foo=bar"
312 )
313 url1 = url.make_url(common_url)
314 url2 = url.make_url(common_url)
315
316 url3 = url2.set(**{component: "new_changed_value"})
317 is_true(url1 != url3)
318 is_false(url1 == url3)
319
320 url4 = url3.set(**{component: getattr(url1, component)})
321
322 is_true(url4 == url1)
323 is_false(url4 != url1)
324
325 @testing.combinations(
326 (

Callers

nothing calls this directly

Calls 3

is_trueFunction · 0.90
is_falseFunction · 0.90
setMethod · 0.45

Tested by

no test coverage detected