MCPcopy Create free account
hub / github.com/MaterializeInc/materialize / __init__

Method __init__

test/race-condition/mzcompose.py:1165–1178  ·  view source on GitHub ↗
(self, c: Composition, rng: random.Random, num_objects: int)

Source from the content-addressed store, hash-verified

1163
1164class SubsequentChain(Scenario):
1165 def __init__(self, c: Composition, rng: random.Random, num_objects: int):
1166 super().__init__(c, rng, num_objects)
1167 objects = [o for o in list(all_subclasses(Object)) if o.enabled]
1168 self.objs = [
1169 rng.choice([o for o in objects if o.can_refer])("o_base", None, rng)
1170 ]
1171 self.manipulators = []
1172 for i in range(num_objects):
1173 self.objs.append(
1174 rng.choice([o for o in objects if o.can_refer])(
1175 f"o_{i}", self.objs[-1], rng
1176 )
1177 )
1178 self.manipulators.append(self.rng.randrange(100))
1179
1180 def _impl(self, num_executions: int) -> str:
1181 result = ""

Callers

nothing calls this directly

Calls 4

all_subclassesFunction · 0.90
listFunction · 0.50
__init__Method · 0.45
appendMethod · 0.45

Tested by

no test coverage detected