MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / test_bind_param_truncated_named

Method test_bind_param_truncated_named

test/sql/test_labels.py:449–459  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

447 )
448
449 def test_bind_param_truncated_named(self):
450 table1 = self.table1
451 bp = bindparam(_truncated_label("this_is_the_long_bindparam_name"))
452 stmt = table1.insert().values(this_is_the_data_column=bp)
453 compiled = stmt.compile(dialect=self._length_fixture(length=10))
454 eq_(
455 compiled.construct_params(
456 params={"this_is_the_long_bindparam_name": 5}
457 ),
458 {"this_1": 5},
459 )
460
461 def test_bind_param_truncated_positional(self):
462 table1 = self.table1

Callers

nothing calls this directly

Calls 8

_length_fixtureMethod · 0.95
bindparamFunction · 0.90
_truncated_labelClass · 0.90
eq_Function · 0.90
valuesMethod · 0.45
insertMethod · 0.45
compileMethod · 0.45
construct_paramsMethod · 0.45

Tested by

no test coverage detected