ó
[³XMc           @   s}   d  Z  d d l m Z d d l m Z e j   rE d d l m Z n d Z d e f d     YZ	 e d k ry d e	 _
 n  d S(	   s-   
Tests for L{twisted.internet._pollingfile}.
i˙˙˙˙(   t   platform(   t   TestCase(   t   _pollingfilet   TestPollableWritePipec           B   s   e  Z d  Z d   Z RS(   s7   
    Tests for L{_pollingfile._PollableWritePipe}.
    c         C   sP   t  j d d    } | j d  | j   | j d  |  j t | j  d S(   sÎ   
        When one tries to pass unicode to L{_pollingfile._PollableWritePipe}, a
        C{TypeError} is raised instead of passing the data to C{WriteFile}
        call which is going to mangle it.
        i   c           S   s   d  S(   N(   t   None(    (    (    sJ   /usr/lib/python2.7/dist-packages/twisted/internet/test/test_pollingfile.pyt   <lambda>   s    t   testu   testN(   R   t   _PollableWritePipet   writet	   checkWorkt   assertRaisest	   TypeError(   t   selft   p(    (    sJ   /usr/lib/python2.7/dist-packages/twisted/internet/test/test_pollingfile.pyt   test_checkWorkUnicode   s
    
(   t   __name__t
   __module__t   __doc__R   (    (    (    sJ   /usr/lib/python2.7/dist-packages/twisted/internet/test/test_pollingfile.pyR      s   s,   _pollingfile is only avalable under Windows.N(   R   t   twisted.python.runtimeR    t   twisted.trial.unittestR   t	   isWindowst   twisted.internetR   R   R   t   skip(    (    (    sJ   /usr/lib/python2.7/dist-packages/twisted/internet/test/test_pollingfile.pyt   <module>   s   