MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_getter

Method test_getter

test/base/test_result.py:86–93  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

84 assert_raises(KeyError, lambda: keyed_tuple._mapping[1])
85
86 def test_getter(self):
87 keyed_tuple = self._fixture([1, 2, 3], ["a", "b", "c"])
88
89 getter = keyed_tuple._parent._getter("b")
90 eq_(getter(keyed_tuple), 2)
91
92 getter = keyed_tuple._parent._getter(2)
93 eq_(getter(keyed_tuple), 3)
94
95 def test_tuple_getter(self):
96 keyed_tuple = self._fixture([1, 2, 3], ["a", "b", "c"])

Callers

nothing calls this directly

Calls 3

_fixtureMethod · 0.95
eq_Function · 0.90
_getterMethod · 0.45

Tested by

no test coverage detected