MCPcopy Index your code
hub / github.com/sqlalchemy/sqlalchemy / _fixture

Method _fixture

test/orm/test_events.py:2733–2746  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2731 cls.mapper_registry.map_imperatively(User, users)
2732
2733 def _fixture(self):
2734 User = self.classes.User
2735
2736 canary = []
2737
2738 def load(target, ctx):
2739 canary.append("load")
2740
2741 def refresh(target, ctx, attrs):
2742 canary.append(("refresh", attrs))
2743
2744 event.listen(User, "load", load)
2745 event.listen(User, "refresh", refresh)
2746 return canary
2747
2748 def test_just_loaded(self):
2749 User = self.classes.User

Callers 2

test_just_loadedMethod · 0.95
test_repeated_rowsMethod · 0.95

Calls 1

listenMethod · 0.45

Tested by

no test coverage detected