MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _expect_success

Method _expect_success

lib/sqlalchemy/testing/exclusions.py:180–194  ·  view source on GitHub ↗
(self, config, name="block")

Source from the content-addressed store, hash-verified

178 raise ex.with_traceback(sys.exc_info()[2])
179
180 def _expect_success(self, config, name="block"):
181 if not self.fails:
182 return
183
184 for fail in self.fails:
185 if fail(config):
186 raise AssertionError(
187 "Unexpected success for '%s' (%s)"
188 % (
189 name,
190 " and ".join(
191 fail._as_string(config) for fail in self.fails
192 ),
193 )
194 )
195
196
197def only_if(predicate, reason=None):

Callers 2

_doMethod · 0.95
fail_ifMethod · 0.80

Calls 3

failFunction · 0.85
joinMethod · 0.45
_as_stringMethod · 0.45

Tested by

no test coverage detected