MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_creation

Method test_creation

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

Source from the content-addressed store, hash-verified

43 eq_(keyed_tuple[1], 2)
44
45 def test_creation(self):
46 keyed_tuple = self._fixture([1, 2], ["a", "b"])
47 eq_(str(keyed_tuple), "(1, 2)")
48 eq_(list(keyed_tuple._mapping.keys()), ["a", "b"])
49 eq_(keyed_tuple._fields, ("a", "b"))
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"])

Callers

nothing calls this directly

Calls 4

_fixtureMethod · 0.95
eq_Function · 0.90
_asdictMethod · 0.80
keysMethod · 0.45

Tested by

no test coverage detected