MCPcopy
hub / github.com/sqlalchemy/sqlalchemy / _combinations

Method _combinations

test/orm/test_events.py:2227–2245  ·  view source on GitHub ↗
(fn)

Source from the content-addressed store, hash-verified

2225 s.commit()
2226
2227 def _combinations(fn):
2228 return testing.combinations(
2229 (lambda A: A, "load", lambda instance, context: instance.unloaded),
2230 (
2231 lambda A: A,
2232 "refresh",
2233 lambda instance, context, attrs: instance.unloaded,
2234 ),
2235 (
2236 lambda session: session,
2237 "loaded_as_persistent",
2238 lambda session, instance: (
2239 instance.unloaded
2240 if instance.__class__.__name__ == "A"
2241 else None
2242 ),
2243 ),
2244 argnames="target, event_name, fn",
2245 )(fn)
2246
2247 def teardown_test(self):
2248 A = self.classes.A

Callers

nothing calls this directly

Calls 1

combinationsMethod · 0.45

Tested by

no test coverage detected