twisted.conch.telnet doesn't call enableRemote when using python -O

[email protected] Fri, 05 Mar 2010 15:58:57 -0000
Newsgroups gmane.comp.python.twisted.bugs
Message-ID <[email protected]>
New submission from ivank <[email protected]>:

twisted.conch.telnet has an assert which should probably not be an assert:

{{{
assert self.enableRemote(option), "enableRemote must return True in this context (for option %r)" % (option,)
}}}

(after all, enableRemote might actually mutate something, and in this case, it looks like it does.)

{{{
python -O `which trial` twisted.conch.test.test_telnet
}}}

{{{
...

===============================================================================
[FAIL]: twisted.conch.test.test_telnet.TelnetTransportTestCase.testAcceptedEnableRequest

Traceback (most recent call last):
  File "/home/a/Projects/Twisted/twisted/conch/test/test_telnet.py", line 400, in <lambda>
    d.addCallback(lambda _:  self._enabledHelper(h, eR=['\x42']))
  File "/home/a/Projects/Twisted/twisted/conch/test/test_telnet.py", line 231, in _enabledHelper
    self.assertEquals(o.enabledRemote, eR)
twisted.trial.unittest.FailTest: not equal:
a = []
b = ['B']

===============================================================================
[FAIL]: twisted.conch.test.test_telnet.TelnetTransportTestCase.testNegotiationBlocksFurtherNegotiation

Traceback (most recent call last):
  File "/home/a/Projects/Twisted/twisted/conch/test/test_telnet.py", line 464, in <lambda>
    dR=['\x24']))
  File "/home/a/Projects/Twisted/twisted/conch/test/test_telnet.py", line 231, in _enabledHelper
    self.assertEquals(o.enabledRemote, eR)
twisted.trial.unittest.FailTest: not equal:
a = []
b = ['$']
}}}

----------
Type     : defect
Component: conch
Keywords : 
Priority : normal
Nosy     : 
----------
http://twistedmatrix.com/trac/ticket/4349