MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_serialize

Method test_serialize

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

Source from the content-addressed store, hash-verified

193 assert_raises(TypeError, should_raise)
194
195 def test_serialize(self):
196 keyed_tuple = self._fixture([1, 2, 3], ["a", None, "b"])
197
198 for loads, dumps in picklers():
199 kt = loads(dumps(keyed_tuple))
200
201 eq_(str(kt), "(1, 2, 3)")
202
203 eq_(list(kt._mapping.keys()), ["a", "b"])
204 eq_(kt._fields, ("a", "b"))
205 eq_(kt._asdict(), {"a": 1, "b": 3})
206
207 @testing.fixture
208 def _load_module(self):

Callers

nothing calls this directly

Calls 7

_fixtureMethod · 0.95
picklersFunction · 0.90
eq_Function · 0.90
loadsFunction · 0.85
dumpsFunction · 0.85
_asdictMethod · 0.80
keysMethod · 0.45

Tested by

no test coverage detected