MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_index_access

Method test_index_access

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

Source from the content-addressed store, hash-verified

50 eq_(keyed_tuple._asdict(), {"a": 1, "b": 2})
51
52 def test_index_access(self):
53 keyed_tuple = self._fixture([1, 2], ["a", "b"])
54 eq_(keyed_tuple[0], 1)
55 eq_(keyed_tuple[1], 2)
56
57 def should_raise():
58 keyed_tuple[2]
59
60 assert_raises(IndexError, should_raise)
61
62 def test_negative_index_access(self):
63 keyed_tuple = self._fixture([1, 2], ["a", "b"])

Callers

nothing calls this directly

Calls 3

_fixtureMethod · 0.95
eq_Function · 0.90
assert_raisesFunction · 0.90

Tested by

no test coverage detected