MCPcopy
hub / github.com/aosabook/500lines / new_node

Method new_node

cluster/code/test/fake_network.py:12–15  ·  view source on GitHub ↗
(self, address=None)

Source from the content-addressed store, hash-verified

10 self.ran = False
11
12 def new_node(self, address=None):
13 assert not self.node, "FakeNetwork only runs one node"
14 self.node = FakeNode(self)
15 return self.node
16
17 def run(self):
18 self.ran = True

Callers 4

test_commMethod · 0.45
test_timeoutMethod · 0.45
test_cancel_timeoutMethod · 0.45
addNodeMethod · 0.45

Calls 1

FakeNodeClass · 0.85

Tested by 4

test_commMethod · 0.36
test_timeoutMethod · 0.36
test_cancel_timeoutMethod · 0.36
addNodeMethod · 0.36