r46965 - telnet
hawkowl-TA+aISz0psMTMxyoc4vAAJOcrHinNvQL0E9HWUfgJXw@public.gmane.org Wed, 9 Mar 2016 23:54:34 -0700 (MST)
| Newsgroups | gmane.comp.python.twisted.commits |
|---|---|
| Message-ID | <[email protected]> |
Author: hawkowl
Date: Wed Mar 9 23:54:24 2016
New Revision: 46965
Modified:
branches/telnet-py3-8228/twisted/conch/test/test_telnet.py
branches/telnet-py3-8228/twisted/python/compat.py
Log:
telnet
Modified: branches/telnet-py3-8228/twisted/conch/test/test_telnet.py
==============================================================================
--- branches/telnet-py3-8228/twisted/conch/test/test_telnet.py (original)
+++ branches/telnet-py3-8228/twisted/conch/test/test_telnet.py Wed Mar 9 23:54:24 2016
@@ -666,13 +666,13 @@
b'\xff\xfa\x01\xff\xff\xff\xf0')
- def _deliver(self, b, *expected):
+ def _deliver(self, bytes, *expected):
"""
Pass the given bytes to the protocol's C{dataReceived} method and
assert that the given events occur.
"""
received = self.protocol.events = []
- self.protocol.dataReceived(b)
+ self.protocol.dataReceived(bytes)
self.assertEqual(received, list(expected))
Modified: branches/telnet-py3-8228/twisted/python/compat.py
==============================================================================
--- branches/telnet-py3-8228/twisted/python/compat.py (original)
+++ branches/telnet-py3-8228/twisted/python/compat.py Wed Mar 9 23:54:24 2016
@@ -688,7 +688,12 @@
def _bytesChr(i):
"""
- Like L{chr} but always returns L{bytes}.
+ Like L{chr} but always works on ASCII, returning L{bytes}.
+
+ @param i: The ASCII code point to return.
+ @type i: L{int}
+
+ @rtype: L{bytes}
"""
if _PY3:
return bytes([i])