MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _make_path

Method _make_path

test/orm/test_options.py:84–93  ·  view source on GitHub ↗
(self, path)

Source from the content-addressed store, hash-verified

82
83class PathTest:
84 def _make_path(self, path):
85 r = []
86 for i, item in enumerate(path):
87 if i % 2 == 0:
88 item = inspect(item)
89 else:
90 if isinstance(item, str):
91 item = inspect(r[-1]).mapper.attrs[item]
92 r.append(item)
93 return tuple(r)
94
95 def _make_path_registry(self, path):
96 return orm_util.PathRegistry.coerce(self._make_path(path))

Callers 4

_make_path_registryMethod · 0.95
_assert_path_resultMethod · 0.95
test_set_strat_entMethod · 0.80
test_set_strat_colMethod · 0.80

Calls 2

inspectFunction · 0.90
appendMethod · 0.45

Tested by

no test coverage detected