MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_rejects_scalar_source

Method test_rejects_scalar_source

test/sql/test_resultset.py:4012–4023  ·  view source on GitHub ↗

_raw_all_tuples() asserts that interim_rows is not None, which excludes results whose source delivers scalars without row construction

(self)

Source from the content-addressed store, hash-verified

4010 result.close()
4011
4012 def test_rejects_scalar_source(self):
4013 """_raw_all_tuples() asserts that interim_rows is not None, which
4014 excludes results whose source delivers scalars without row
4015 construction"""
4016 result = IteratorResult(
4017 SimpleResultMetaData(["a"]),
4018 iter([(1,), (2,)]),
4019 _source_supports_scalars=True,
4020 )
4021 result._generate_rows = False
4022 with expect_raises(AssertionError):
4023 result._raw_all_tuples()
4024
4025 def test_row_logging_falls_back_to_rows(self, debug_logging_engine):
4026 """with debug-level engine logging established, Row objects are

Callers

nothing calls this directly

Calls 4

IteratorResultClass · 0.90
expect_raisesFunction · 0.90
_raw_all_tuplesMethod · 0.80

Tested by

no test coverage detected