MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_visit_name

Method test_visit_name

test/sql/test_external_traversal.py:349–361  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

347 assert struct3 == s3
348
349 def test_visit_name(self):
350 # override fns in testlib/schema.py
351 from sqlalchemy import Column
352
353 class CustomObj(Column):
354 pass
355
356 assert CustomObj.__visit_name__ == Column.__visit_name__ == "column"
357
358 foo, bar = CustomObj("foo", String), CustomObj("bar", String)
359 bin_ = foo == bar
360 set(ClauseVisitor().iterate(bin_))
361 assert set(ClauseVisitor().iterate(bin_)) == {foo, bar, bin_}
362
363
364class BinaryEndpointTraversalTest(fixtures.TestBase):

Callers

nothing calls this directly

Calls 2

CustomObjClass · 0.85
iterateMethod · 0.80

Tested by

no test coverage detected