Correct spelling mistakes
This commit is contained in:
parent
f566fae439
commit
6477f239e8
|
@ -178,7 +178,7 @@ class Boss(object):
|
||||||
# inputs. We expect them to be called just after initialization, while
|
# inputs. We expect them to be called just after initialization, while
|
||||||
# we're in the S0_empty state. You must call exactly one of them, and the
|
# we're in the S0_empty state. You must call exactly one of them, and the
|
||||||
# call must happen while we're in S0_empty, which makes them good
|
# call must happen while we're in S0_empty, which makes them good
|
||||||
# candiates for being a proper @m.input, but set_code() will immediately
|
# candidates for being a proper @m.input, but set_code() will immediately
|
||||||
# (reentrantly) cause self.got_code() to be fired, which is messy. These
|
# (reentrantly) cause self.got_code() to be fired, which is messy. These
|
||||||
# are all passthroughs to the Code machine, so one alternative would be
|
# are all passthroughs to the Code machine, so one alternative would be
|
||||||
# to have Wormhole call Code.{input,allocate,set_code} instead, but that
|
# to have Wormhole call Code.{input,allocate,set_code} instead, but that
|
||||||
|
|
|
@ -607,7 +607,7 @@ class DilatedConnectionProtocol(Protocol, object):
|
||||||
if self._role is FOLLOWER:
|
if self._role is FOLLOWER:
|
||||||
self._record.send_record(KCM())
|
self._record.send_record(KCM())
|
||||||
elif isinstance(token, KCM):
|
elif isinstance(token, KCM):
|
||||||
# if we're the leader, add this connection as a candiate.
|
# if we're the leader, add this connection as a candidate.
|
||||||
# if we're the follower, accept this connection.
|
# if we're the follower, accept this connection.
|
||||||
self.got_kcm() # connector.add_candidate()
|
self.got_kcm() # connector.add_candidate()
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -187,7 +187,7 @@ class Manager(object):
|
||||||
# TODO: be more specific about the error. dilation_version==None
|
# TODO: be more specific about the error. dilation_version==None
|
||||||
# means we had no version in common with them, which could either
|
# means we had no version in common with them, which could either
|
||||||
# be because they're so old they don't dilate at all, or because
|
# be because they're so old they don't dilate at all, or because
|
||||||
# they're so new that they no longer accomodate our old version
|
# they're so new that they no longer accommodate our old version
|
||||||
self.fail(failure.Failure(OldPeerCannotDilateError()))
|
self.fail(failure.Failure(OldPeerCannotDilateError()))
|
||||||
|
|
||||||
self.start()
|
self.start()
|
||||||
|
|
|
@ -124,7 +124,7 @@ class Connection(unittest.TestCase):
|
||||||
clear_mock_calls(n, connector, t, m)
|
clear_mock_calls(n, connector, t, m)
|
||||||
|
|
||||||
# now pretend this connection wins (either the Leader decides to use
|
# now pretend this connection wins (either the Leader decides to use
|
||||||
# this one among all the candiates, or we're the Follower and the
|
# this one among all the candidates, or we're the Follower and the
|
||||||
# Connector is reacting to add_candidate() by recognizing we're the
|
# Connector is reacting to add_candidate() by recognizing we're the
|
||||||
# only candidate there is)
|
# only candidate there is)
|
||||||
c.select(m)
|
c.select(m)
|
||||||
|
@ -295,7 +295,7 @@ class Connection(unittest.TestCase):
|
||||||
clear_mock_calls(n, connector, t, m)
|
clear_mock_calls(n, connector, t, m)
|
||||||
|
|
||||||
# now pretend this connection wins (either the Leader decides to use
|
# now pretend this connection wins (either the Leader decides to use
|
||||||
# this one among all the candiates, or we're the Follower and the
|
# this one among all the candidates, or we're the Follower and the
|
||||||
# Connector is reacting to add_candidate() by recognizing we're the
|
# Connector is reacting to add_candidate() by recognizing we're the
|
||||||
# only candidate there is)
|
# only candidate there is)
|
||||||
c.select(m)
|
c.select(m)
|
||||||
|
|
|
@ -595,7 +595,7 @@ class PretendUnregisterError(Exception):
|
||||||
|
|
||||||
class PushPull(unittest.TestCase):
|
class PushPull(unittest.TestCase):
|
||||||
# test our wrapper utility, which I copied from
|
# test our wrapper utility, which I copied from
|
||||||
# twisted.internet._producer_helpers since it isn't publically exposed
|
# twisted.internet._producer_helpers since it isn't publicly exposed
|
||||||
|
|
||||||
def test_start_unpaused(self):
|
def test_start_unpaused(self):
|
||||||
p, unr, pp, eq = make_pushpull([True]) # pause on each resumeProducing
|
p, unr, pp, eq = make_pushpull([True]) # pause on each resumeProducing
|
||||||
|
|
|
@ -246,7 +246,7 @@ class Record(unittest.TestCase):
|
||||||
f.mock_calls[:] = []
|
f.mock_calls[:] = []
|
||||||
n.mock_calls[:] = []
|
n.mock_calls[:] = []
|
||||||
|
|
||||||
# 5: at this point we ought to be able to send a messge, the KCM
|
# 5: at this point we ought to be able to send a message, the KCM
|
||||||
with mock.patch("wormhole._dilation.connection.encode_record",
|
with mock.patch("wormhole._dilation.connection.encode_record",
|
||||||
side_effect=[b"r-kcm"]) as er:
|
side_effect=[b"r-kcm"]) as er:
|
||||||
r.send_record(kcm)
|
r.send_record(kcm)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user