MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_class_presented

Method test_class_presented

test/base/test_result.py:335–349  ·  view source on GitHub ↗

To support different kinds of objects returned vs. rows, there are two wrapper classes for Result.

(self)

Source from the content-addressed store, hash-verified

333 is_true(r1._soft_closed)
334
335 def test_class_presented(self):
336 """To support different kinds of objects returned vs. rows,
337 there are two wrapper classes for Result.
338 """
339
340 r1 = self._fixture()
341
342 r2 = r1.columns(0, 1, 2)
343 assert isinstance(r2, result.Result)
344
345 m1 = r1.mappings()
346 assert isinstance(m1, result.MappingResult)
347
348 s1 = r1.scalars(1)
349 assert isinstance(s1, result.ScalarResult)
350
351 def test_mapping_plus_base(self):
352 r1 = self._fixture()

Callers

nothing calls this directly

Calls 4

_fixtureMethod · 0.95
columnsMethod · 0.45
mappingsMethod · 0.45
scalarsMethod · 0.45

Tested by

no test coverage detected