MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_params_impl

Method test_params_impl

test/sql/test_statement_params.py:47–68  ·  test/sql/test_statement_params.py::BasicTests.test_params_impl
(self)

Source from the content-addressed store, hash-verified

45 )
46
47 def test_params_impl(self):
48 exclude = (dml.UpdateBase,)
49 visit_names = set()
50 for cls_ in self._all_subclasses(ExecutableStatement):
51 if not issubclass(cls_, exclude):
52 if class="st">"__visit_name__" in cls_.__dict__:
53 visit_names.add(cls_.__visit_name__)
54 eq_(cls_.params, ExecutableStatement.params, cls_)
55 else:
56 ne_(cls_.params, ExecutableStatement.params, cls_)
57 for other in exclude:
58 if issubclass(cls_, other):
59 eq_(cls_.params, other.params, cls_)
60 break
61 else:
62 assert False
63
64 extra = {class="st">"orm_from_statement"}
65 eq_(
66 visit_names - extra,
67 {i.__visit_name__ for i in self._relevant_impls()},
68 )
69
70 @testing.combinations(*_relevant_impls())
71 def test_compile_params(self, impl):

Callers

nothing calls this directly

Calls 5

_all_subclassesMethod · 0.95
_relevant_implsMethod · 0.95
eq_Function · 0.90
ne_Function · 0.90
addMethod · 0.45

Tested by

no test coverage detected