Your IP : 172.28.240.42


Current Path : /usr/lib/python2.7/dist-packages/twisted/internet/test/
Upload File :
Current File : //usr/lib/python2.7/dist-packages/twisted/internet/test/test_serialport.pyc

ó
¹7¬Nc@s§dZddlmZddlmZddlmZddlmZyddl	m
Z
Wnek
rsdZ
nXde
fd„ƒYZd	ejfd
„ƒYZdS(s+
Tests for L{twisted.internet.serialport}.
iÿÿÿÿ(tunittest(tFailure(tProtocol(tConnectionDone(t
serialportt	DoNothingcBs eZdZd„Zd„ZRS(s.
    Object with methods that do nothing.
    cOsdS(N((tselftargstkwargs((sI/usr/lib/python2.7/dist-packages/twisted/internet/test/test_serialport.pyt__init__scCsd„S(Nc_sdS(N(tNone(RR((sI/usr/lib/python2.7/dist-packages/twisted/internet/test/test_serialport.pyt<lambda>s((Rtattr((sI/usr/lib/python2.7/dist-packages/twisted/internet/test/test_serialport.pyt__getattr__s(t__name__t
__module__t__doc__R	R
(((sI/usr/lib/python2.7/dist-packages/twisted/internet/test/test_serialport.pyRs	tSerialPortTestscBs,eZdZedkr!dZnd„ZRS(st
    Minimal testing for Twisted's serial port support.

    See ticket #2462 for the eventual full test suite.
    s%Serial port support is not available.cs¥dtjfd„ƒY}g‰dtf‡fd†ƒY}||ƒddtƒƒ}|jˆdgƒttƒƒ}|j|ƒ|jˆdd|fgƒd	S(
sr
        C{connectionMade} and C{connectionLost} are called on the protocol by
        the C{SerialPort}.
        tDummySerialPortcBseZeZd„ZRS(cSsdS(N((R((sI/usr/lib/python2.7/dist-packages/twisted/internet/test/test_serialport.pyt_finishPortSetup5s(RRRt_serialFactoryR(((sI/usr/lib/python2.7/dist-packages/twisted/internet/test/test_serialport.pyR2stSerialProtocolcs&eZ‡fd†Z‡fd†ZRS(csˆjdƒdS(NtconnectionMade(tappend(R(tevents(sI/usr/lib/python2.7/dist-packages/twisted/internet/test/test_serialport.pyR;scsˆjd|fƒdS(NtconnectionLost(R(Rtreason(R(sI/usr/lib/python2.7/dist-packages/twisted/internet/test/test_serialport.pyR>s(RRRR((R(sI/usr/lib/python2.7/dist-packages/twisted/internet/test/test_serialport.pyR:sttreactorRRN(Rt
SerialPortRRtassertEqualRRR(RRRtporttf((RsI/usr/lib/python2.7/dist-packages/twisted/internet/test/test_serialport.pyttest_connectionMadeLost,s
N(RRRRR
tskipR!(((sI/usr/lib/python2.7/dist-packages/twisted/internet/test/test_serialport.pyR!s	N(Rt
twisted.trialRttwisted.python.failureRttwisted.internet.protocolRttwisted.internet.errorRttwisted.internetRtImportErrorR
tobjectRtTestCaseR(((sI/usr/lib/python2.7/dist-packages/twisted/internet/test/test_serialport.pyt<module>s