ó
‹wÛjc           @   s›   d  d l  m Z d  d l Z d  d l Z d  d l Z d  d l Z e j e j d  d k d ƒ d e j f d	 „  ƒ  Yƒ Z	 d
 „  Z
 e d k r— e
 ƒ  n  d S(   iÿÿÿÿ(   t   test_supportNi   t   wint   os2t   riscoss    can't easily test on this systemt   SelectTestCasec           B   sR   e  Z d  d d „  ƒ  YZ d d	 d „  ƒ  YZ d „  Z d „  Z d „  Z d „  Z RS(
   t   Nopec           B   s   e  Z RS(    (   t   __name__t
   __module__(    (    (    s†   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_select.pyR      s   t   Almostc           B   s   e  Z d  „  Z RS(   c         C   s   d S(   Nt   fileno(    (   t   self(    (    s†   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_select.pyR	      s    (   R   R   R	   (    (    (    s†   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_select.pyR      s   c         C   s‰   |  j  t t j d d d ƒ |  j  t t j |  j ƒ  g g  g  ƒ |  j  t t j |  j ƒ  g g  g  ƒ |  j  t t j g  g  g  d ƒ d  S(   Ni   i   i   s   not a number(   t   assertRaisest	   TypeErrort   selectR   R   (   R
   (    (    s†   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_select.pyt   test_error_conditions   s    %%c         C   sU   t  j  g  g  g  d ƒ \ } } } |  j | | ƒ |  j | | ƒ |  j | | ƒ d  S(   Ni   (   R   t   assertIsNot(   R
   t   rt   wt   x(    (    s†   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_select.pyt   test_returned_list_identity   s    !c         C   s  d } t  j | d ƒ } xê d d D]Þ } t j r> d
 G| GHn  t j | g g  g  | ƒ \ } } } | | | f g  g  g  f k r† q# n  | | | f | g g  g  f k rë | j ƒ  } t j rÊ t | ƒ GHn  | s# t j rá d GHn  Pq# q# n  |  j d | | | ƒ q# W| j	 ƒ  d  S(   Ns?   for i in 0 1 2 3 4 5 6 7 8 9; do echo testing...; sleep 1; doneR   i    i   i   i   i   i   i
   s	   timeout =t   EOFs'   Unexpected return values from select():(   i    i   i   i   i   i   (   N(
   NNNNNNNNNN(
   t   ost   popent   NoneR    t   verboseR   t   readlinet   reprt   failt   close(   R
   t   cmdt   pt   toutt   rfdt   wfdt   xfdt   line(    (    s†   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_select.pyt   test_select   s&    	$!		c            s`   g  ‰  d d ‡  f d †  ƒ  Y} | ƒ  g d ˆ  (|  j  t j g  ˆ  g  ƒ g  ˆ  d  g  f ƒ d  S(   Nt   Fc              s   e  Z ‡  f d  †  Z RS(   c            s   ˆ  d =t  j j ƒ  S(   Niÿÿÿÿ(   t   syst
   __stdout__R	   (   R
   (   t   a(    s†   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_select.pyR	   8   s    (   R   R   R	   (    (   R(   (    s†   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_select.pyR%   7   s   i
   i   (    (   t   assertEqualR   (   R
   R%   (    (   R(   s†   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_select.pyt   test_select_mutated5   s    (    (    (   R   R   R   R   R   R   R$   R*   (    (    (    s†   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_select.pyR      s   			c           C   s   t  j t ƒ t  j ƒ  d  S(   N(   R    t   run_unittestR   t   reap_children(    (    (    s†   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_select.pyt	   test_main>   s    t   __main__(   R   R   R   (   t   testR    t   unittestR   R   R&   t   skipIft   platformt   TestCaseR   R-   R   (    (    (    s†   /home/sim/yocto/scarthgap/build/tmp/work/x86_64-linux/python-native/2.7.18/recipe-sysroot-native/usr/lib/python2.7/test/test_select.pyt   <module>   s   	5	