MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / test_tostring_with_newlines

Method test_tostring_with_newlines

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

Source from the content-addressed store, hash-verified

87 )
88
89 def test_tostring_with_newlines(self):
90 try:
91 raise sa_exceptions.DBAPIError.instance(
92 "this is a message\nthis is the next line\nthe last line",
93 None,
94 OperationalError(),
95 DatabaseError,
96 )
97 except sa_exceptions.DBAPIError as exc:
98 eq_(
99 str(exc),
100 "(test.base.test_except.OperationalError) \n"
101 "[SQL: this is a message\nthis is the next line\n"
102 "the last line]\n"
103 "(Background on this error at: https://sqlalche.me/e/%s/e3q8)"
104 % sa_exceptions._version_token,
105 )
106
107 def test_statement_error_no_code(self):
108 try:

Callers

nothing calls this directly

Calls 3

eq_Function · 0.90
instanceMethod · 0.80
OperationalErrorClass · 0.70

Tested by

no test coverage detected