MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / test_error_large_dict

Method test_error_large_dict

test/engine/test_logging.py:485–500  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

483 )
484
485 def test_error_large_dict(self):
486 assert_raises_message(
487 tsa.exc.DBAPIError,
488 r".*INSERT INTO nonexistent \(data\) values \(:data\)\]\n"
489 r"\[parameters: "
490 r"\[{'data': '0'}, {'data': '1'}, {'data': '2'}, "
491 r"{'data': '3'}, {'data': '4'}, {'data': '5'}, "
492 r"{'data': '6'}, {'data': '7'} ... displaying 10 of "
493 r"100 total bound parameter sets ... {'data': '98'}, "
494 r"{'data': '99'}\]",
495 lambda: exec_sql(
496 self.eng,
497 "INSERT INTO nonexistent (data) values (:data)",
498 [{"data": str(i)} for i in range(100)],
499 ),
500 )
501
502 def test_error_large_list(self):
503 assert_raises_message(

Callers

nothing calls this directly

Calls 2

assert_raises_messageFunction · 0.90
exec_sqlFunction · 0.70

Tested by

no test coverage detected