MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_tostring

Method test_tostring

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

Source from the content-addressed store, hash-verified

73 self.assert_(True)
74
75 def test_tostring(self):
76 try:
77 raise sa_exceptions.DBAPIError.instance(
78 "this is a message", None, OperationalError(), DatabaseError
79 )
80 except sa_exceptions.DBAPIError as exc:
81 eq_(
82 str(exc),
83 "(test.base.test_except.OperationalError) \n"
84 "[SQL: this is a message]\n"
85 "(Background on this error at: https://sqlalche.me/e/%s/e3q8)"
86 % sa_exceptions._version_token,
87 )
88
89 def test_tostring_with_newlines(self):
90 try:

Callers

nothing calls this directly

Calls 3

eq_Function · 0.90
instanceMethod · 0.80
OperationalErrorClass · 0.70

Tested by

no test coverage detected