MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_get_names

Method test_get_names

test/engine/test_reflection.py:1758–1769  ·  view source on GitHub ↗
(self, connection)

Source from the content-addressed store, hash-verified

1756
1757 @testing.requires.unicode_connections
1758 def test_get_names(self, connection):
1759 inspector = inspect(connection)
1760 names = {tname: (cname, ixname) for tname, cname, ixname in self.names}
1761 for tname in inspector.get_table_names():
1762 assert tname in names
1763 eq_(
1764 [
1765 (rec["name"], rec["column_names"][0])
1766 for rec in inspector.get_indexes(tname)
1767 ],
1768 [(names[tname][1], names[tname][0])],
1769 )
1770
1771
1772class SchemaTest(fixtures.TestBase):

Callers

nothing calls this directly

Calls 4

inspectFunction · 0.90
eq_Function · 0.90
get_table_namesMethod · 0.45
get_indexesMethod · 0.45

Tested by

no test coverage detected