MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_tostring_large_dict

Method test_tostring_large_dict

test/base/test_except.py:164–189  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

162 eq_(orig.args, ("méil",))
163
164 def test_tostring_large_dict(self):
165 try:
166 raise sa_exceptions.DBAPIError.instance(
167 "this is a message",
168 {
169 "a": 1,
170 "b": 2,
171 "c": 3,
172 "d": 4,
173 "e": 5,
174 "f": 6,
175 "g": 7,
176 "h": 8,
177 "i": 9,
178 "j": 10,
179 "k": 11,
180 },
181 OperationalError(),
182 DatabaseError,
183 )
184 except sa_exceptions.DBAPIError as exc:
185 assert str(exc).startswith(
186 "(test.base.test_except.OperationalError) \n"
187 "[SQL: this is a message]\n"
188 "[parameters: {"
189 )
190
191 def test_tostring_large_list(self):
192 try:

Callers

nothing calls this directly

Calls 3

instanceMethod · 0.80
OperationalErrorClass · 0.70
startswithMethod · 0.45

Tested by

no test coverage detected