MCPcopy Create free account
hub / github.com/zzzeek/sqlalchemy / test_dialect_sub_compile

Method test_dialect_sub_compile

test/sql/test_compiler.py:6276–6289  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

6274 )
6275
6276 def test_dialect_sub_compile(self):
6277 class Widget(ClauseElement):
6278 __visit_name__ = "widget"
6279 stringify_dialect = "sqlite"
6280
6281 def visit_widget(self, element, **kw):
6282 return "widget"
6283
6284 with mock.patch(
6285 "sqlalchemy.dialects.sqlite.base.SQLiteCompiler.visit_widget",
6286 visit_widget,
6287 create=True,
6288 ):
6289 eq_(str(Grouping(Widget())), "(widget)")
6290
6291 def test_dialect_sub_compile_has_stack(self):
6292 """test #10753"""

Callers

nothing calls this directly

Calls 3

eq_Function · 0.90
GroupingClass · 0.90
WidgetClass · 0.70

Tested by

no test coverage detected