MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_negative_index_access

Method test_negative_index_access

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

Source from the content-addressed store, hash-verified

60 assert_raises(IndexError, should_raise)
61
62 def test_negative_index_access(self):
63 keyed_tuple = self._fixture([1, 2], ["a", "b"])
64 eq_(keyed_tuple[-1], 2)
65 eq_(keyed_tuple[-2:-1], (1,))
66
67 def test_slice_access(self):
68 keyed_tuple = self._fixture([1, 2], ["a", "b"])

Callers

nothing calls this directly

Calls 2

_fixtureMethod · 0.95
eq_Function · 0.90

Tested by

no test coverage detected